Semantic Perch Intelligence MCP
Provides tools for analyzing and optimizing Cloudflare D1 database schemas, including schema introspection, relationship analysis, validation, and optimization suggestions.
Integrates with Cloudflare Workers D1 database service for schema analysis and intelligence, enabling AI-assisted database development.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Semantic Perch Intelligence MCPanalyze database schema for development"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Semantic Perch Intelligence MCP
PerchIQX - Deep Insights. Database Intelligence.
A Model Context Protocol (MCP) server for Cloudflare D1 database introspection. Reference implementation of Semantic Intent patterns demonstrating semantic anchoring, observable properties, and domain-driven design for AI-assisted database development.
π Table of Contents
Related MCP server: mcp-db-schema-tools
π― What Makes This Different
This isn't just another database introspection toolβit's a reference implementation of proven semantic intent patterns:
β Semantic Anchoring: Schema analysis based on meaning (table purpose, relationships), not technical metrics (row counts, sizes)
β Observable Properties: Decisions anchored to directly observable schema markers (foreign keys, indexes, constraints)
β Intent Preservation: Database semantics maintained through all transformations (development β staging β production)
β Domain Boundaries: Clear semantic ownership (Schema Domain β Query Optimization Domain β MCP Protocol Domain)
Built on research from Semantic Intent as Single Source of Truth, this implementation demonstrates how to build maintainable, AI-friendly database tools that preserve intent.
π Quick Start
Prerequisites
Node.js 20.x or higher
Cloudflare account with D1 databases
Cloudflare API token with D1 access
Installation
Clone the repository
git clone https://github.com/semanticintent/semantic-perch-intelligence-mcp.git cd semantic-perch-intelligence-mcpInstall dependencies
npm installConfigure environment
Copy the example configuration:
cp .env.example .envUpdate
.envwith your Cloudflare credentials:# Cloudflare Configuration CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id CLOUDFLARE_API_TOKEN=your_cloudflare_api_token # D1 Database Configuration - Development D1_DEV_DATABASE_ID=your_dev_database_id D1_DEV_DATABASE_NAME=your_dev_database_name # D1 Database Configuration - Staging (Optional) D1_STAGING_DATABASE_ID=your_staging_database_id D1_STAGING_DATABASE_NAME=your_staging_database_name # D1 Database Configuration - Production (Optional) D1_PROD_DATABASE_ID=your_prod_database_id D1_PROD_DATABASE_NAME=your_prod_database_nameNote: At least one database environment must be configured.
Build the server
npm run buildStart the MCP server
npm startOr use the provided shell script:
./start-d1-mcp.sh
Get Cloudflare API Token
Go to Cloudflare Dashboard
Navigate to My Profile β API Tokens
Click Create Token
Use the Edit Cloudflare Workers template
Add D1 permissions:
D1:ReadCopy the token to your
.envfile
Get D1 Database IDs
# List all your D1 databases
wrangler d1 list
# Get specific database info
wrangler d1 info <database-name>Copy the database IDs to your .env file.
π οΈ MCP Tools
This server provides 4 comprehensive MCP tools for D1 database introspection:
1. analyze_database_schema
Analyze complete database schema structure with metadata and optional sample data.
Parameters:
environment(required):"development"|"staging"|"production"includeSamples(optional, default:true): Include sample data from tablesmaxSampleRows(optional, default:5): Maximum rows per table sample
Returns:
Complete schema analysis
Table structures with columns, types, constraints
Indexes and foreign keys
Sample data from each table (if enabled)
Schema metadata and statistics
Example:
{
"name": "analyze_database_schema",
"arguments": {
"environment": "development",
"includeSamples": true,
"maxSampleRows": 5
}
}2. get_table_relationships
Extract and analyze foreign key relationships between tables.
Parameters:
environment(required): Database environmenttableName(optional): Filter relationships for specific table
Returns:
Foreign key relationships with cardinality (one-to-many, many-to-one)
Referential integrity rules (CASCADE, SET NULL, etc.)
Relationship metadata and statistics
Example:
{
"name": "get_table_relationships",
"arguments": {
"environment": "production",
"tableName": "users"
}
}3. validate_database_schema
Validate database schema for common issues and anti-patterns.
Parameters:
environment(required): Database environment
Returns:
Schema validation results
Missing primary keys
Foreign keys without indexes
Naming convention violations
Tables without relationships
Example:
{
"name": "validate_database_schema",
"arguments": {
"environment": "production"
}
}4. suggest_database_optimizations
Generate schema optimization recommendations based on structure analysis.
Parameters:
environment(required): Database environment
Returns:
Prioritized optimization suggestions (high/medium/low)
Missing index recommendations
Primary key suggestions
Schema improvement opportunities
Performance optimization tips
Example:
{
"name": "suggest_database_optimizations",
"arguments": {
"environment": "production"
}
}π Connect to Claude Desktop
Connect this MCP server to Claude Desktop for AI-assisted database development.
Configuration
Edit Claude Desktop config - Go to Settings β Developer β Edit Config
Add MCP server configuration:
{
"mcpServers": {
"semantic-perch": {
"command": "node",
"args": [
"/absolute/path/to/semantic-perch-intelligence-mcp/dist/index.js"
],
"env": {
"CLOUDFLARE_ACCOUNT_ID": "your_account_id",
"CLOUDFLARE_API_TOKEN": "your_api_token",
"D1_DEV_DATABASE_ID": "your_dev_db_id",
"D1_DEV_DATABASE_NAME": "your_dev_db_name",
"D1_STAGING_DATABASE_ID": "your_staging_db_id",
"D1_STAGING_DATABASE_NAME": "your_staging_db_name",
"D1_PROD_DATABASE_ID": "your_prod_db_id",
"D1_PROD_DATABASE_NAME": "your_prod_db_name"
}
}
}
}Restart Claude Desktop
Verify tools are available - You should see 4 D1 tools in Claude's tool list
Usage Example
In Claude Desktop:
"Analyze my production database schema and suggest optimizations for tables with foreign keys"
Claude will use the analyze_database_schema and suggest_database_optimizations tools automatically.
ποΈ Architecture
This project demonstrates Domain-Driven Hexagonal Architecture with clean separation of concerns:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Presentation Layer β
β (MCP Server - Protocol Handling) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Application Layer β
β (Use Cases - Schema Analysis Orchestration) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Domain Layer β
β (Schema Entities, Relationship Logic, Services) β
β Pure Business Logic β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Infrastructure Layer β
β (Cloudflare D1 REST API, HTTP Client) β
β Technical Adapters β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββImplementation Status
Status: β Hexagonal architecture refactoring complete
Current Structure:
src/
βββ domain/ # Business logic (entities, services)
β βββ entities/ # DatabaseSchema, TableInfo, Column, etc.
β βββ services/ # SchemaAnalyzer, RelationshipAnalyzer, etc.
β βββ repositories/ # Port interfaces
β βββ value-objects/ # Environment enum
βββ application/ # Use cases and orchestration
β βββ use-cases/ # AnalyzeSchema, GetRelationships, etc.
β βββ ports/ # Cache provider interface
βββ infrastructure/ # External adapters
β βββ adapters/ # CloudflareD1Repository, Cache
β βββ config/ # CloudflareConfig, DatabaseConfig
β βββ http/ # CloudflareAPIClient
βββ presentation/ # MCP protocol layer
β βββ mcp/ # D1DatabaseMCPServer
βββ index.ts # Composition root (DI)See ARCHITECTURE.md for detailed design documentation.
Layer Responsibilities
Domain Layer:
Database schema entities (Schema, Table, Relationship, Index)
Schema analysis business logic
Relationship extraction logic
Optimization recommendation rules
Application Layer:
Orchestrate domain services
Execute use cases (AnalyzeSchema, GetRelationships, etc.)
Coordinate infrastructure adapters
Infrastructure Layer:
Cloudflare D1 REST API integration
HTTP client for API calls
Cache provider (in-memory)
Presentation Layer:
MCP server initialization
Tool registration and routing
Request/response formatting
Semantic Intent Principles
This codebase follows strict semantic anchoring rules:
Semantic Over Structural
// β SEMANTIC: Based on observable schema properties const needsIndex = table.hasForeignKey() && !table.hasIndexOnForeignKey() // β STRUCTURAL: Based on technical metrics const needsIndex = table.rowCount > 10000 && table.queryCount > 100Intent Preservation
// β Environment semantics preserved through transformations const schema = await fetchSchema(Environment.PRODUCTION) // Schema analysis preserves "production" intent - no overridesObservable Anchoring
// β Based on directly observable properties const relationships = extractForeignKeys(sqliteMaster) // β Based on inferred behavior const relationships = inferFromQueryPatterns(logs)
See SEMANTIC_ANCHORING_GOVERNANCE.md for complete governance rules.
π§ͺ Testing
Status: β Comprehensive test suite with 398 tests passing
Test Coverage
β Domain Layer: 212 tests (entities, services, validation)
β Infrastructure Layer: 64 tests (D1 adapter, API client, config)
β Application Layer: 35 tests (use cases, orchestration)
β Presentation Layer: 13 tests (MCP server, tool routing)
β Integration: 15 tests (end-to-end flows)
β Value Objects: 59 tests (Environment, immutability)
Total: 398 tests (all passing β )
Running Tests
# Run all tests
npm test
# Watch mode
npm run test:watch
# With UI
npm run test:ui
# Coverage report
npm run test:coverageTest Framework
Vitest: Fast unit testing framework
@vitest/coverage-v8: Code coverage reports
Mock Strategy: Mock Cloudflare D1 API responses via interface implementations
π Learning from This Implementation
This codebase serves as a reference implementation for semantic intent patterns in database tooling.
Key Files to Study
Hexagonal Architecture Implementation:
src/index.ts - Composition root with dependency injection
src/domain/entities/ - Domain entities with semantic validation
src/domain/services/ - Pure business logic services
src/application/use-cases/ - Orchestration layer
src/infrastructure/adapters/ - External adapters
src/presentation/mcp/ - MCP protocol layer
Reference Documentation:
D1_MCP_REFACTORING_PLAN.md - Complete refactoring plan
SEMANTIC_ANCHORING_GOVERNANCE.md - Governance rules
ARCHITECTURE.md - Architecture details
Related Projects
semantic-context-mcp - Sibling reference implementation for context management
semantic-chirp-intelligence-mcp - Fantasy hockey intelligence MCP (ChirpIQX)
π€ Contributing
We welcome contributions! This is a reference implementation, so contributions should maintain semantic intent principles.
How to Contribute
Read the guidelines: CONTRIBUTING.md
Check refactoring plan: D1_MCP_REFACTORING_PLAN.md
Follow the architecture: Maintain layer boundaries and semantic anchoring
Add tests: All changes need comprehensive test coverage
Document intent: Explain WHY, not just WHAT
Contribution Standards
β Follow semantic intent patterns
β Maintain hexagonal architecture (post-refactoring)
β Add comprehensive tests (90%+ coverage target)
β Include semantic documentation
β Pass all CI checks
Quick Links:
Contributing Guide - Detailed guidelines
Code of Conduct - Community standards
Architecture Guide - Design principles
Security Policy - Report vulnerabilities
Community
π¬ Discussions - Ask questions
π Issues - Report bugs
π Security - Report vulnerabilities privately
π Security
Security is a top priority. Please review our Security Policy for:
API token management best practices
What to commit / what to exclude
Reporting security vulnerabilities
Security checklist for deployment
Found a vulnerability? Email: security@semanticintent.dev
π¬ Research Foundation
This implementation is based on the research paper "Semantic Intent as Single Source of Truth: Immutable Governance for AI-Assisted Development".
Core Principles Applied
Semantic Over Structural - Schema analysis based on meaning, not metrics
Intent Preservation - Environment semantics maintained through transformations
Observable Anchoring - Decisions based on directly observable schema properties
Immutable Governance - Protect semantic integrity at runtime
Related Resources
Research Paper (coming soon)
semanticintent.dev (coming soon)
π Project Roadmap
β Phase 0: Initial Implementation (Complete)
Monolithic MCP server with 6 tools
D1 REST API integration
Basic schema analysis
β Phase 1: Domain Layer (Complete)
10 domain entities with semantic validation
3 domain services (SchemaAnalyzer, RelationshipAnalyzer, OptimizationService)
212 passing tests
β Phase 2: Infrastructure Layer (Complete)
CloudflareD1Repository adapter
CloudflareAPIClient HTTP client
InMemoryCacheProvider
64 passing tests
β Phase 3: Application Layer (Complete)
4 use cases (AnalyzeSchema, GetRelationships, ValidateSchema, SuggestOptimizations)
Port interfaces (ICloudflareD1Repository, ICacheProvider)
35 passing tests
β Phase 4: Presentation Layer (Complete)
D1DatabaseMCPServer with 4 MCP tools
Request/response DTOs
13 passing tests
β Phase 5: Integration & Composition Root (Complete)
Dependency injection in index.ts
Environment configuration
15 integration tests
β Phase 6: CI/CD & Documentation (Complete)
TypeScript build verification
README updated
398 total tests passing
π― Phase 7: Production Readiness (Planned)
GitHub Actions CI/CD workflow
Dependabot automation
Security scanning
GitHub repository setup
See D1_MCP_REFACTORING_PLAN.md for detailed roadmap.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Built on Model Context Protocol by Anthropic
Inspired by Hexagonal Architecture (Alistair Cockburn)
Based on Domain-Driven Design principles (Eric Evans)
Part of the Semantic Intent research initiative
This is a reference implementation demonstrating semantic intent patterns for database introspection. Study the code, learn the patterns, and apply them to your own projects. ποΈ
Available Tools
5 toolsanalyze_database_schemaB
Analyze D1 database schema structure, tables, columns, indexes, and relationships with optional sample data
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes | Database environment to analyze | |
| maxSampleRows | No | Maximum number of sample rows per table | |
| includeSamples | No | Include sample data from tables (max 5 rows per table) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden of behavioral disclosure. It says 'Analyze' which implies a read-only operation, but doesn't explicitly state that it won't modify anything, nor does it mention potential performance impacts of sampling data or usage on production environments. This lack of detail is a significant gap for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of about 15 words, front-loaded with the verb and resource. Every word is informative, with no redundancy or filler. It is well-structured and immediately conveys the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description should explain what the analysis returns (e.g., a report, schema representation, or diagnostics). It does not. Given the tool has 3 parameters and covers multiple aspects of the schema, the description is incomplete. It also fails to mention any caveats like environment differences or performance considerations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description mentions 'optional sample data', which aligns with includeSamples and maxSampleRows, but adds no additional semantic detail beyond what the input schema already provides. It neither clarifies parameter formats nor explains edge cases.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Analyze' and the resource 'D1 database schema', listing specific aspects (tables, columns, indexes, relationships) and optional sample data. It distinguishes this from sibling tools like get_table_relationships by its broader scope, though it doesn't explicitly contrast with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for general schema analysis, but provides no explicit guidance on when to use this tool versus siblings like validate_database_schema or suggest_schema_optimizations. There are no exclusions or alternative recommendations, so using it is inferred rather than directed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compare_schemasA
Compare database schemas between environments to detect drift and plan migrations with ICE-scored differences
| Name | Required | Description | Default |
|---|---|---|---|
| sourceDatabaseId | Yes | Source database ID to compare from | |
| targetDatabaseId | Yes | Target database ID to compare to | |
| sourceEnvironment | Yes | Source database environment | |
| targetEnvironment | Yes | Target database environment |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the tool outputs ICE-scored differences and is used for migration planning, but it does not state whether the operation is read-only, any side effects, permissions needed, or what ICE-scored means. This adds some context beyond the name but leaves notable gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that efficiently conveys the action, resource, and purpose without fluff. Every word contributes value, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 4 required parameters, no output schema, and no annotations, the description provides a clear purpose and mentions the ICE-scored output. However, it leaves some gaps: 'ICE-scored' is unexplained, and the phrase 'between environments' could be more precise given that the actual parameters are database IDs. Overall, it is fairly complete but not exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema descriptions cover all 4 parameters (100% coverage), so the baseline is 3. The description adds no parameter-specific details beyond the general 'between environments' concept, which is already reflected in the schema's environment enums.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb (Compare), the resource (database schemas), and the scope (between environments), while also specifying the purpose (detect drift, plan migrations) and the distinctive output (ICE-scored differences). This effectively differentiates it from sibling tools like analyze_database_schema or validate_database_schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (comparing schemas across environments for drift detection or migration planning) and provides clear context. However, it does not explicitly mention when not to use it or name alternatives, which would elevate it to a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_relationshipsB
Extract and analyze foreign key relationships between tables in the database
| Name | Required | Description | Default |
|---|---|---|---|
| tableName | No | Optional: Filter relationships for specific table | |
| environment | Yes | Database environment to analyze |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations available, the description carries the full burden of disclosure. It does not state whether the operation is read-only, what side effects might occur, what output format to expect, or any other behavioral traits. The vague 'analyze' adds little transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence that is front-loaded with the tool's purpose. No unnecessary words or repetition, making it appropriately concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having a simple schema, the tool has no output schema, so the description should explain what the return value looks like and what 'analyze' entails. It does not, leaving the agent without critical context for interpreting results or understanding the tool's full behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with both parameters already explained (tableName filter and environment). The description adds no additional meaning to the parameters, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb ('Extract and analyze') and resource ('foreign key relationships between tables'), and it distinguishes itself from sibling tools that focus on broader schema analysis, validation, optimization, or comparison.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, no exclusions or prerequisites are mentioned. The description implies usage through its purpose but offers no explicit context or contrast with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
suggest_schema_optimizationsB
Analyze schema and suggest performance optimizations (missing indexes, redundant indexes, etc.)
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes | Database environment to analyze for optimizations |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It implies a read-only analysis ('analyze and suggest'), but does not explicitly state that it makes no changes, nor does it describe the output format or any permissions/limitations. This leaves significant behavioral ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence with parenthetical examples. It is front-loaded with the core action and contains no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one enum parameter, the description plus schema provides a basic understanding. However, the lack of usage guidance, explicit read-only nature, and output expectations leaves gaps that a more complete description would fill. The 'etc.' hints at additional optimizations but does not elaborate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage: the sole parameter 'environment' is well-described with an enum list, so the schema already conveys complete parameter semantics. The description does not add further parameter detail, but none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action ('Analyze schema and suggest performance optimizations') with concrete examples ('missing indexes, redundant indexes'). It is distinguishable from siblings like validate_database_schema or compare_schemas, though it could more explicitly contrast with analyze_database_schema, which may also analyze schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied: the tool is for suggesting performance optimizations, not for general schema analysis or validation. However, there is no explicit guidance on when to choose this over analyze_database_schema or other siblings, nor any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_database_schemaB
Validate database schema integrity and detect potential issues (missing primary keys, orphaned foreign keys, etc.)
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes | Database environment to validate |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for disclosing behavioral traits. It states what the tool detects but does not mention whether it is read-only, whether it modifies data, what the output format is, or if it requires special permissions. This is a meaningful gap for a validation tool that could potentially be expected to run side-effect-free checks.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that front-loads the primary action ('Validate database schema integrity') and then provides concrete examples to clarify scope. There is no redundant wording or filler, and every part of the sentence contributes useful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, yet the description does not explain what the result looks like or how issues are reported. Given the presence of sibling tools with overlapping purposes, the description also fails to clarify the tool's unique position. While the single parameter is well-documented, the lack of return-value or behavioral context leaves the description incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% schema description coverage: the single parameter 'environment' is fully described with an enum of valid values and a clear meaning. The description adds no additional semantic detail beyond the schema, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Validate') with a clear resource ('database schema') and enumerates concrete examples of what it checks (missing primary keys, orphaned foreign keys). This distinguishes it from related sibling tools like analyze_database_schema and suggest_schema_optimizations, which imply broader or different scopes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives such as analyze_database_schema or compare_schemas. It does not mention any exclusions, prerequisites, or scenarios where another tool would be preferred, leaving the agent to infer usage solely from the tool name and purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v2.0.0- First observed
analyze_database_schema - First observed
compare_schemas - First observed
get_table_relationships - First observed
suggest_schema_optimizations - First observed
validate_database_schema
TDQS
The tools are largely distinct, but there is some overlap between 'analyze_database_schema' and 'get_table_relationships', where the former includes relationships as part of its analysis. However, each tool has a clear primary focus, so an agent can usually select the right one based on context.
All tool names follow a consistent verb_noun pattern: analyze, get, validate, suggest, compare. The naming is predictable and makes it easy to infer the action and target of each tool.
With 5 tools, the server is well-scoped for its stated purpose of database schema intelligence. Each tool covers a distinct aspect without redundancy, making the surface area manageable.
The tool set covers the full lifecycle of schema analysis: inspection, relationship mapping, validation, optimization suggestions, and comparison. There are no obvious gaps for the intended functionality.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Monitor MCP servers, API contracts and AI outputs for schema drift. Alerts on breaking changes.
Related MCP Servers
AlicenseAqualityDmaintenanceEnables AI-assisted analysis and optimization of Cloudflare D1 databases through comprehensive schema introspection, relationship mapping, validation, and optimization recommendations. Demonstrates semantic intent patterns with hexagonal architecture for maintainable database development workflows.43MIT- AlicenseNot gradedqualityDmaintenanceDatabase schema management MCP server for Claude Code, enabling natural language management from business requirements to complete databases.MIT
- FlicenseAqualityCmaintenanceA static, read-only MCP server that exposes a database knowledge base (schema, relationships, workflows, and reasoning patterns) so Claude Code / Copilot can reason about a database without a live connection.10-
- AlicenseNot gradedqualityCmaintenanceCloudflare MCP server with multi-user credential management, full Cloudflare API coverage, and schema discovery tools for safe LLM-driven Cloudflare resource management.11MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/semanticintent/semantic-perch-intelligence-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server