db-tools-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_TOOLS_CONFIG_DIR | No | Override the configuration and cache directory location. Defaults to ~/.config/db-tools/. |
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": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_sourcesA | List all database sources available in the local metadata cache. |
| list_schemasC | List all schemas for a given source. |
| list_tablesB | List all tables in a given schema. |
| get_tableC | Get columns and FK relationships (inbound + outbound) for a specific table. |
| get_dialectC | Return the SQL dialect for a source (e.g. 'mssql', 'snowflake'). |
| list_all_foreign_keysC | Return every foreign key defined in a schema. |
| find_direct_joinsB | Return FK-defined direct joins between two tables (either direction). Provide table names as 'schema.table' (e.g. 'dbo.Orders'). |
| suggest_joinsA | Suggest join paths between two tables using FK graph + heuristic column matching. Results ordered by descending confidence. Table names as 'schema.table'. |
| search_tablesB | Search for tables whose names contain keyword (case-insensitive). |
| search_columnsB | Search for columns whose names contain column_name (case-insensitive). Optionally restrict to a single schema. |
| list_stored_proceduresC | List all stored procedure names in a given schema. |
| get_stored_procedureA | Get full metadata for a stored procedure: parameters, create/modify dates, and definition. |
| search_stored_proceduresA | Search for stored procedures whose names contain keyword (case-insensitive). Optionally restrict to a single schema. |
| search_stored_procedure_textA | Search the body (definition) of stored procedures for keyword (case-insensitive). Returns each matching procedure with a short excerpt showing the first line that contains the keyword. Optionally restrict to a single schema. |
| get_call_templateA | Generate a ready-to-use call template for a stored procedure. style='sql' — EXEC statement with typed placeholders for each parameter. style='python' — pyodbc script that executes the SP and collects every result set returned by the server using cursor.nextset(). |
| export_stored_procedureB | Write the stored procedure definition (SQL code only) to a file. |
| refresh_metadataA | Refresh the local schema metadata cache by querying live databases. THIS IS AN EXPENSIVE OPERATION — each source may take several minutes. Do NOT call automatically before reads. The cache is designed to be long-lived. Only call when:
Each source is throttled to one refresh per 24 hours. Set force=True ONLY when the user has confirmed recent schema changes. |
| add_databaseA | Add a new database source to config.yaml and optionally test the connection. db_type='sqlserver': url (required) -- SQLAlchemy connection URL, e.g.: "mssql+pyodbc:///?odbc_connect=DRIVER=ODBC Driver 17 for SQL Server; Server=myserver;Database=MyDB;Trusted_Connection=Yes;" db_type='snowflake' (via SQL Server linked server + OPENQUERY): sqlserver_url (required) -- SQLAlchemy URL for the gateway SQL Server linked_server (required) -- Linked server name (e.g. "SNOWFLAKE") snowflake_database (required) -- Snowflake database (e.g. "MY_DB") Common: include_schemas -- ["*"] for all (default), or explicit list exclude_schemas -- defaults to system schemas for the db_type test_connection -- set False to skip the live connection test After adding, call refresh_metadata(source='') to populate the cache. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/urjeetpatel/db-tools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server