sql-lens-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SQL_LENS_MCP_HOST | No | Bind address for the HTTP transport. | 127.0.0.1 |
| SQL_LENS_MCP_HTTP | No | Enable HTTP transport. Set to true to use Streamable HTTP instead of stdio. Default is disabled (stdio). | false |
| SQL_LENS_MCP_PORT | No | HTTP port for the Streamable HTTP transport. | 3000 |
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
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connect_databaseD | Connect to a database |
| disconnect_databaseC | Disconnect from a database |
| list_connectionsB | List all database connections |
| execute_queryB | Execute a SQL query. Results are paginated: at most maxRows rows are returned per call. When the response reports hasMore, call again with offset=nextOffset to fetch the next page. Each page re-executes the query (offset pagination), so paging an expensive query repeats its cost. The most recent result per connection is also exposed as query-result://{connectionId}/csv and query-result://{connectionId}/json resources. |
| nl_queryC | Natural language to SQL query |
| describe_schemaC | Describe database schema |
| sample_rowsB | Fetch representative rows from a table (default 10, max 100) |
| explain_queryA | Show the query plan for a SQL statement without executing it |
| describe_relationshipsA | Describe foreign-key relationships between tables for join planning |
| view_database_connectionsB | Open an interactive dashboard to view and manage all database connections |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| explore-database | Explore a database schema |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| connections-list | List of all database connections |
| query-history | Recent query execution history |
| connection-manager-ui | Interactive dashboard for database connections |
| connection-manager-data | Live connection data for the dashboard |
TDQS
Scored across 10 tools
Most tools map to clearly distinct actions (connect/disconnect/list, describe schema vs. relationships, execute vs. explain vs. natural-language query). The one soft overlap is view_database_connections vs. list_connections, and nl_query is ambiguous about whether it only generates SQL or also executes it.
Nine of ten tools follow a clean verb_noun snake_case pattern (describe_schema, execute_query, connect_database, sample_rows). The lone outlier is nl_query, which uses an abbreviated noun_noun form with no verb.
Ten tools is well within the sweet spot and each covers a real step in the inspect-connect-query workflow. Nothing looks like filler or an arbitrary wrapper.
Connection lifecycle, schema introspection, sampling, querying, and plan inspection are all covered, giving a coherent end-to-end surface. Minor gaps remain: no explicit table/object listing beyond describe_schema, and no query validation or cancellation for the long-running paginated case.