text2sql-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENAI_API_KEY | No | OpenAI API key | |
| TEXT2SQL_MODEL | No | LangChain model id | anthropic:claude-sonnet-4-6 |
| ANTHROPIC_API_KEY | No | Anthropic API key | |
| TEXT2SQL_EXAMPLES | No | Path to a scenarios.md file | |
| TEXT2SQL_DATABASE_URL | Yes | SQLAlchemy URL for the database | |
| TEXT2SQL_INSTRUCTIONS | No | Business rules or hints |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryA | Ask the database a natural-language question. The agent explores the schema, writes SQL, executes it, and self-corrects on errors before returning. Read-only — only SELECT-style statements. Args:
question: The natural-language question, e.g. "top 5 customers by revenue".
max_rows: Cap on rows returned in Returns:
dict with:
sql: the final verified SQL
data: list of row dicts (capped at max_rows)
error: error message if execution failed, else None
row_count: number of rows in |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 1 tool
With only one tool, there is no possibility of confusion between overlapping functions. The tool's purpose is clearly defined for natural-language database queries, making selection trivial.
The single tool named 'query' is simple, intuitive, and uses a clear verb form. While there is no pattern to compare, the naming is unambiguous and follows common conventions for a query action.
The server has just one tool, which feels thin for a database interaction service. However, the tool is comprehensive and handles schema exploration, SQL generation, execution, and self-correction internally, so it may be sufficient for its narrow scope.
The tool covers the full natural-language query lifecycle: it interprets the question, writes SQL, executes it, and returns results with error handling. As a read-only query tool, it fully addresses the stated purpose without obvious gaps.