Skip to main content
Glama
kosminus

querywise-mcp

by kosminus

querywise-mcp

An MCP server (and a CLI) that lets an LLM query your databases in natural language through a business semantic layer — glossary, metric definitions, data dictionary, knowledge base, and example queries — grounded against your real schema.

It's a refactor of QueryWise (a full-stack text-to-SQL app) into a headless tool: no web UI, no Postgres requirement. The metadata store is an embedded SQLite + sqlite-vec database, so the server runs from a single file.

Two ways to use it

  1. As an MCP server — Claude (or any MCP client) calls the tools. The recommended loop is: get_semantic_context(connection, question) → the model writes a read-only SELECTrun_sql(connection, sql). The client's own model does the reasoning; the server provides grounded context + safe execution.

  2. As a CLIquerywise ask <connection> "<question>" runs the full server-side NL→SQL pipeline (compose → validate → execute → interpret). This path needs an LLM provider key (or local Ollama).

The semantic layer, connectors, and execution are shared by both.

Related MCP server: NLQueries

Install

python3 -m venv .venv && source .venv/bin/activate
pip install -e .                 # core (SQLite store, sqlite-vec, Postgres + SQLite targets)
pip install -e ".[llm]"          # + Anthropic/OpenAI for `ask` and cloud embeddings
pip install -e ".[bigquery,databricks]"   # + extra target connectors

Configuration is via environment variables / .env (see .env.example). Zero config works for keyword-only operation; add a key (or Ollama) to unlock embeddings and the ask pipeline.

Quick start (zero external infra)

querywise init                                   # create ~/.querywise/querywise.db
querywise connections add shop \
    --connector-type sqlite -c /path/to/app.db   # introspects + embeds
querywise context shop "revenue by segment"      # see the grounded context
querywise sql shop "SELECT ..."                  # run read-only SQL
querywise ask shop "what is total revenue by segment?"   # full pipeline (needs LLM)

Run as an MCP server

querywise serve            # stdio (for Claude Desktop / Claude Code / Cursor)
querywise serve --http     # Streamable HTTP on MCP_HOST:MCP_PORT (default 127.0.0.1:8077)

Register with Claude

First make sure the store the server will read is initialized (and optionally seeded):

querywise init                          # create ~/.querywise/querywise.db
querywise seed-sample                   # optional: zero-infra IFRS-9 sample → connection "ifrs-db"

Use an absolute command path. MCP clients launch the server with a minimal PATH, so the bare querywise-mcp often won't resolve. Point at the entry point inside your venv, e.g. /path/to/.venv/bin/querywise-mcp.

The server won't read your repo .env. It runs from the client's working directory, so pass everything it needs (DATABASE_URL, provider keys, model) in the env block below.

Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), then fully quit and reopen Claude Desktop:

{
  "mcpServers": {
    "querywise": {
      "command": "/path/to/.venv/bin/querywise-mcp",
      "env": {
        "DEFAULT_LLM_PROVIDER": "ollama",
        "DATABASE_URL": "sqlite+aiosqlite:////Users/me/.querywise/querywise.db"
      }
    }
  }
}

Claude Code — one command:

claude mcp add querywise /path/to/.venv/bin/querywise-mcp \
  -e DEFAULT_LLM_PROVIDER=ollama \
  -e DATABASE_URL=sqlite+aiosqlite:////Users/me/.querywise/querywise.db
# verify: claude mcp list   (or /mcp inside a session)

Note the four slashes in the SQLite URL — sqlite+aiosqlite:// (scheme) plus the absolute path /Users/me/....

Why DEFAULT_LLM_PROVIDER? It's a server setting, not your chat model. Claude is the client LLM — it calls the granular tools and writes the answer, so it needs no provider config. The server only uses a provider for two things: embeddings (semantic search over your metadata — optional; degrades to keyword-only without one) and the all-in-one ask/generate_sql tools (which run their own LLM). Set it to ollama for key-free local embeddings, or to anthropic/openai (with the matching *_API_KEY in env) if you want to call the server-side ask tool. Omit it entirely to run keyword-only.

MCP surface

Tools (25): list_connections, create_connection, test_connection, introspect_connection, delete_connection, list_tables, describe_table, get_semantic_context, run_sql, generate_sql, ask, query_history, glossary/metric/dictionary/sample-query/knowledge management (list_*/add_*/delete_*, plus add_knowledge_url).

Query paths — the four tools people mix up:

Tool(s)

LLM key?

What it does

get_semantic_context + run_sql

No

Server grounds the question; the client writes the SELECT; run it read-only.

generate_sql

Yes

Server writes SQL from the question but does not execute — review, then run_sql.

ask

Yes

Full pipeline: ground → generate → execute → interpret, returns a Markdown answer.

Resource: querywise://{connection}/schema — the cached schema as text. Prompt: text_to_sql(connection, question) — scaffolds the ground→write→run loop.

connection accepts a connection name or id everywhere.

Connectors

Target

Notes

SQLite

Read-only (mode=ro), zero infra. Great for local files + demos.

PostgreSQL

asyncpg, read-only transaction.

BigQuery

optional extra; service-account JSON in the connection string.

Databricks

optional extra; Unity Catalog or Hive metastore.

All execution is read-only: a static SQL blocklist (DDL/DML/admin/injection) plus connector-level read-only enforcement.

How the semantic layer works

For each question the context builder selects minimal relevant context via a hybrid of (1) vector similarity over embeddings, (2) keyword matching, and (3) foreign-key expansion, then resolves glossary terms, metrics, dictionary value-mappings, knowledge excerpts, and example queries into a structured prompt block. Embeddings are stored as float32 BLOBs and searched with sqlite-vec's vec_distance_cosine; if the extension can't load, search transparently falls back to in-process cosine. With no embedding provider, it degrades to keyword-only matching.

Building the semantic layer

The glossary, metrics, value dictionaries, sample queries, and knowledge docs are populated through the MCP management tools — so you can build them conversationally from an MCP client like Claude, no CLI required. Asking Claude to "add a glossary term active customer defined as … with SQL …" calls add_glossary_term; the same goes for add_metric, add_dictionary_entry, add_sample_query, and add_knowledge / add_knowledge_url (and the matching list_* / delete_* tools to review or remove them). For a ready-made example, querywise seed-sample loads the bundled IFRS 9 banking layer.

Architecture

MCP client (Claude/…)  ──stdio/http──┐
CLI (`querywise ask`)  ──in-process──┤
                                     ▼
                          server.py / cli.py
                                     │
        ┌────────────────┬──────────┴───────────┬──────────────┐
        ▼                ▼                      ▼              ▼
   semantic/        services/               llm/          connectors/
 context builder   query pipeline      agents+providers  PG/SQLite/BQ/DBX
        │                │                      │              │
        └──────── db/ (SQLite + sqlite-vec metadata store) ────┘

Development

ruff check src/
python -m compileall src/

The metadata schema is created on startup (db/init.py) — no migration tool. Switching embedding providers/dimensions clears now-incompatible vectors automatically.

Available Tools

25 tools
add_dictionary_entryA

Map a coded column value to its business meaning (e.g. stage '1' -> 'Performing').

Use so grounding and generation can interpret enum-like codes. Requires the connection to be introspected first so the column can be resolved. Returns the new entry's id.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
table_nameYesTable containing the column (must already be introspected).
column_nameYesColumn whose coded value you are explaining.
raw_valueYesThe stored/coded value as it appears in the column (e.g. '1').
display_valueYesThe business meaning of that value (e.g. 'Performing').
descriptionNoOptional extra explanation of the value.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate it's not read-only and not idempotent. The description adds that it returns the new entry's id and requires prior introspection, which provides useful behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each serving a clear purpose: purpose with example, usage guidance, and return value with prerequisite. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a straightforward mapping tool without an output schema, the description covers the return value, prerequisite, and usage context. It is sufficiently complete for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents all parameters. The description adds a brief example but does not significantly enhance parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Map a coded column value') and the resource ('to its business meaning'), with a concrete example. It distinguishes from siblings like 'add_glossary_term' by specifying it's for coded column values in a database.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to use it for 'grounding and generation' and that it requires the connection to be introspected first. While it doesn't mention when not to use it or alternatives, the guidance is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_glossary_termA

Define a business glossary term that maps business language to a SQL expression.

Use to teach the semantic layer phrases like 'active customer' so future grounding and generation apply them consistently. For a named, reusable aggregate (a KPI) use add_metric instead. Returns the new term's id.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
termYesThe business term being defined (e.g. 'active customer').
definitionYesPlain-language meaning of the term.
sql_expressionYesSQL snippet/predicate that implements the term (e.g. a WHERE condition).
related_tablesNoOptional list of table names the term applies to.

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description mentions return value (new term's id) but does not elaborate on side effects or error cases. Annotations show it is not read-only, consistent with a create operation. Adequate but not enhanced.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, followed by usage guidance and alternative. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given annotations, schema coverage, and no output schema, the description is fairly complete: it states purpose, usage, alternative, and return value. Lacks details on idempotency or duplicate handling, but acceptable for a simple create tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema descriptions cover all parameters (100% coverage). Description provides a usage example ('active customer') and mentions return value, but adds minimal extra meaning beyond schema for the parameters themselves.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool defines a business glossary term mapping business language to SQL expression. It distinguishes from sibling 'add_metric' by noting the difference for KPIs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (teach semantic layer phrases) and provides alternative ('add_metric' for reusable aggregates). Offers clear guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_knowledgeA

Import a document you provide (plain text or HTML) as searchable business knowledge.

Use when you already have the content; to fetch it from a web page instead, use add_knowledge_url. The content is chunked and embedded for semantic retrieval during grounding. Returns the document id and chunk count.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
titleYesTitle for the knowledge document.
contentYesDocument body as plain text or HTML; it is chunked and indexed for search.
source_urlNoOptional source URL to record as provenance.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations show readOnlyHint=false and idempotentHint=false. Description adds that content is chunked and embedded for semantic retrieval, plus return info (doc id, chunk count). No contradiction. Could mention potential duplication or overwrite behavior but not required.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, front-loaded with the verb, no redundant information. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers input format, processing (chunking, embedding), output (doc id, chunk count), and alternative tool. Lacks error conditions or permission requirements, but overall sufficient given the tool's simplicity and schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear parameter descriptions. Description only reiterates that content is chunked, adding no new parameter-level insight beyond the schema. Baseline score is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Import a document you provide...' and specifies the format (plain text/HTML). It distinguishes itself from the sibling add_knowledge_url by contrasting use cases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use this tool ('when you already have the content') and when to use the alternative ('to fetch it from a web page instead, use add_knowledge_url').

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_knowledge_urlA

Fetch a web page server-side and import its content as searchable business knowledge.

Use to ingest documentation by URL; to import content you already have, use add_knowledge. Performs an outbound HTTP GET (follows redirects, 30s timeout), then chunks and embeds the page. Returns the document id and chunk count.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
urlYesPublic URL to fetch server-side and import.
titleNoOptional title; defaults to the URL.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description adds substantial behavioral context beyond annotations: 'Performs an outbound HTTP GET (follows redirects, 30s timeout), then chunks and embeds the page. Returns the document id and chunk count.' Annotations only indicate non-read-only, non-idempotent, open-world; description fills in the actual side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, no wasted words. Each sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (3 params, no output schema), the description covers all necessary aspects: purpose, usage guidance, behavioral details, and return values. No gaps identified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (all three parameters described in schema). Description provides no additional parameter-specific semantics beyond what's already in the schema, so baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Fetch a web page server-side and import its content as searchable business knowledge.' It uses specific verbs (fetch, import) and resource (web page), and distinguishes from sibling add_knowledge by noting it's for URLs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use to ingest documentation by URL; to import content you already have, use add_knowledge.' Provides when-to-use and when-not-to-use with a named alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_metricA

Define a metric: a named, reusable SQL aggregate (a KPI).

Use for quantitative measures like revenue or default rate so grounding and generation can reuse them; for phrase-to-SQL mappings use add_glossary_term instead. Returns the new metric's id and name.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
metric_nameYesMachine-friendly metric identifier (e.g. 'gross_revenue').
display_nameYesHuman-friendly metric label (e.g. 'Gross Revenue').
sql_expressionYesSQL aggregate expression implementing the metric (e.g. SUM(amount)).
descriptionNoOptional explanation of what the metric measures.
related_tablesNoOptional list of table names the metric is computed from.
dimensionsNoOptional dimensions to group the metric by (e.g. ['region','month']).

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate it's not read-only or idempotent. The description adds that it returns the new metric's id and name, which is helpful but doesn't disclose other behaviors like duplicate handling or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, front-loaded with the core purpose and clear usage guidance. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the high schema coverage and annotations, the description provides a complete high-level understanding. However, it lacks notes on prerequisites (e.g., connection must exist) or error handling, which would make it slightly more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the description adds little beyond what the schema already provides for parameters. No new semantic information is given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool defines a metric as a reusable SQL aggregate (KPI) and distinguishes it from the sibling tool add_glossary_term by specifying that the latter is for phrase-to-SQL mappings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use this tool (for quantitative measures like revenue) and when to use the alternative (add_glossary_term for phrase-to-SQL mappings), providing clear guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

add_sample_queryA

Save a validated natural-language -> SQL example to improve future generation.

Use to capture good question/SQL pairs for this connection; they are reused as few-shot examples by generate_sql and ask. Returns the new example's id.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
natural_languageYesExample question in natural language.
sql_queryYesCorrect, validated SQL that answers the question.
descriptionNoOptional note about the example.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate write operation (readOnlyHint=false) and non-idempotency. Description adds that it returns the new example's id, but lacks details on validation, error handling, or side effects beyond basic behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no extraneous text. First sentence front-loads the purpose, second adds usage context and return value. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple addition tool with 3 required parameters and no output schema, the description adequately covers purpose, usage, and return value. Missing details like error conditions or duplication handling, but sufficient for typical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers all parameters with detailed descriptions (100% coverage). Description does not add extra parameter semantics beyond what schema already provides, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the action 'Save a validated natural-language -> SQL example' and the resource. It distinguishes from sibling tools like add_dictionary_entry or add_knowledge by specifying the type of example being saved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description explains when to use the tool ('capture good question/SQL pairs') and mentions how it will be reused by generate_sql and ask, providing clear context but no explicit when-not-to-use or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

askA
Read-only

Answer a natural-language question end-to-end via the server pipeline.

Builds context, generates SQL, validates, executes it (read-only), and interprets the results. This is the fully automated path and requires an LLM provider. Use it when you want a finished answer rather than raw rows; use the get_semantic_context + run_sql path for manual control, or generate_sql to get SQL without executing. Returns a Markdown report (summary, highlights, executed SQL, metadata, follow-ups, and a data preview).

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
questionYesNatural-language question to answer end-to-end.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint and openWorldHint. The description complements this by detailing the pipeline steps (builds context, generates SQL, validates, executes read-only, interprets), and specifies the return format (Markdown report with components). No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured paragraph that front-loads the purpose. Every sentence adds value, though it could be slightly more concise without losing key details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (end-to-end NL to answer), the description covers the full pipeline, return format, prerequisites (LLM provider), and alternatives. With 100% schema coverage, useful annotations, and an output schema, the description is fully adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are well-described in the schema. The description adds no new parameter-level semantics but contextualizes their use. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Answer a natural-language question end-to-end', specifying the verb and resource. It distinguishes from siblings by naming alternatives like get_semantic_context+run_sql and generate_sql.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly gives usage guidance: 'Use it when you want a finished answer rather than raw rows' and provides alternative paths for manual control or SQL-only generation. It also notes the requirement for an LLM provider.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_connectionA

Register a new target database connection (credentials encrypted at rest).

Use once per database before introspecting or querying it. This only stores the connection — it does NOT verify connectivity or read the schema; follow with test_connection, then introspect_connection. Returns the created connection's id and metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesUnique, human-friendly name used to reference this connection later.
connector_typeYesOne of: postgresql, bigquery, databricks, mysql, snowflake.
connection_stringYesDriver URL (PostgreSQL/MySQL) or connector-specific JSON config (BigQuery/Databricks). Stored encrypted at rest.
default_schemaNoDefault schema to introspect and query when none is specified.public
max_rowsNoMaximum number of rows any query on this connection may return.
max_query_timeout_secondsNoPer-query timeout, in seconds, for this connection.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses key traits beyond annotations: credentials encrypted at rest, no connectivity/schema verification. Annotations (readOnlyHint=false) are consistent; description adds behavioral context about what the tool does NOT do.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, then usage, then behavioral limits. Every sentence earns its place; no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a creation tool: explains purpose, usage workflow, security, and return value. All 6 parameters documented in schema; description covers workflow gaps. No output schema needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds value beyond schema: mentions encrypted storage for connection_string and states return value (id and metadata). Provides workflow context for parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb+resource: 'Register a new target database connection'. Distinguishes itself from sibling tools like test_connection and introspect_connection by stating what it does NOT do (verify connectivity or read schema).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance: 'Use once per database before introspecting or querying it' and explicit follow-up steps ('follow with test_connection, then introspect_connection'). Lacks explicit 'when not to use' but strong positive guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_connectionA
DestructiveIdempotent

Permanently delete a connection and all its cached schema + semantic metadata.

Removes the connection plus its glossary, metrics, dictionary, sample queries, and knowledge. Destructive and not reversible — use only to retire a database you no longer query. Returns {deleted: true}.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description details exactly what is deleted (connection, glossary, metrics, dictionary, sample queries, knowledge) and the return value. This exceeds the annotations which only mark it as destructive. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each serving a purpose: purpose, scope of deletion, and usage guidance. Front-loaded with key information. No unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description covers all necessary aspects: what it does, what it destroys, when to use, and return value. It is complete given the context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the parameter description in the schema is already clear. The tool description does not repeat parameter details but adds context about the deletion impact, which is useful. No additional parameter documentation needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'delete', the resource 'connection', and specifies it is permanent and removes all associated metadata (glossary, metrics, etc.). This distinguishes it from sibling tools like create_connection or delete_glossary_term.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises when to use: 'use only to retire a database you no longer query.' It also warns of irreversibility. However, it does not mention alternatives for non-destructive scenarios (e.g., disconnecting or cleaning metadata separately), though sibling tools exist for those purposes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_glossary_termA
DestructiveIdempotent

Delete one business glossary term by its id.

Destructive and not reversible. Look up ids with list_glossary. Returns {deleted} indicating whether a matching term was removed.

ParametersJSON Schema
NameRequiredDescriptionDefault
term_idYesId of the glossary term to delete (from list_glossary).

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the destructive and irreversible nature, aligning with the destructiveHint=true annotation. It also mentions the return value '{deleted}'. However, it does not address idempotency (idempotentHint=true), which would clarify that multiple identical calls produce the same result. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences. The purpose is stated first, followed by key behavioral warnings and return value. No unnecessary words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with annotations and no output schema, the description adequately covers the action, parameter source, side effects, and return value. It is complete and leaves no ambiguity about usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The parameter 'term_id' is already fully described in the schema with the same guidance ('from list_glossary'). The description reinforces this by mentioning lookup. Given 100% schema coverage, the description adds marginal value but is still helpful for emphasizing the source of IDs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Delete one business glossary term by its id', specifying the verb and resource. It distinguishes itself from sibling tools like add_glossary_term and list_glossary by explicitly mentioning deletion and id lookup.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises to 'Look up ids with list_glossary', providing clear context for obtaining the required parameter. It also warns 'Destructive and not reversible', indicating when to use caution. However, it does not explicitly state when not to use this tool or list alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_knowledgeA
DestructiveIdempotent

Delete one knowledge document (and its chunks) by id.

Destructive and not reversible. Look up ids with list_knowledge. Returns {deleted} indicating whether a matching document was removed.

ParametersJSON Schema
NameRequiredDescriptionDefault
doc_idYesId of the knowledge document to delete (from list_knowledge).

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate destructiveHint=true and idempotentHint=true. The description adds crucial context: 'Destructive and not reversible' and the return format '{deleted}'. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, front-loaded with the main action, no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description fully covers purpose, prerequisites, and return value.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description says 'by id' and references lookup, adding minimal value beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Delete one knowledge document (and its chunks) by id,' providing a specific verb and resource. It distinguishes itself from siblings like list_knowledge.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description instructs users to 'Look up ids with list_knowledge,' offering a clear prerequisite. It also warns 'Destructive and not reversible,' guiding appropriate use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_metricA
DestructiveIdempotent

Delete one metric definition by its id.

Destructive and not reversible. Look up ids with list_metrics. Returns {deleted} indicating whether a matching metric was removed.

ParametersJSON Schema
NameRequiredDescriptionDefault
metric_idYesId of the metric to delete (from list_metrics).

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate destructiveHint=true. The description adds 'Destructive and not reversible' and specifies the return shape {deleted}, providing behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise three-sentence description with no wasted words. Front-loaded with primary action, then important warnings and return info.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description covers purpose, prerequisite step, destructive nature, and return value comprehensively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage and describes metric_id. The description reinforces by telling users to get ids from list_metrics, adding practical context for parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Delete one metric definition by its id.' The verb 'delete' with resource 'metric definition' is specific and distinguishes from siblings like list_metrics or add_metric.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to 'Look up ids with list_metrics' and notes the destructive nature. While it doesn't explicitly state when not to use, the guidance is sufficient for correct usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_tableA
Read-only

Describe one cached table in detail, including its foreign-key relationships.

Returns columns (with defaults/comments), outgoing foreign keys, and incoming references from other tables. Use when you need a single table's keys to write a join; for a list of all tables use list_tables. Reads the cache (introspect first). Raises if the table is not found.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
table_nameYesExact table name to describe, as shown by list_tables.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations set readOnlyHint=true, which is consistent with the description stating 'Reads the cache.' The description goes beyond annotations by noting that the tool 'Raises if the table is not found,' adding important error behavior. It also implies that the cache must be populated first, which is useful context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences: first sentence clearly states purpose, second details the output components, third gives usage guidance and mentions a prerequisite and error condition. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description adequately summarizes the return content (columns, defaults, comments, foreign keys, incoming references). It also covers error behavior and usage context. However, it does not specify the exact structure or format of the output, which could be helpful for agents expecting a detailed schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% coverage: each parameter has a description. The tool description adds minimal extra value for parameters; it mentions that table_name should be 'as shown by list_tables,' which is a slight addition. Baseline is 3 due to high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Describe one cached table in detail, including its foreign-key relationships.' It specifies the exact verb (describe), the resource (one cached table), and the scope of detail. This distinguishes it from sibling tool list_tables which returns a list of all tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'Use when you need a single table's keys to write a join; for a list of all tables use list_tables.' It also mentions a prerequisite: 'Reads the cache (introspect first).' This clearly tells the agent when to use this tool versus alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_sqlA
Read-only

Translate a natural-language question into SQL via the server LLM, without executing it.

Requires an LLM provider to be configured. Use when you want to review or edit the SQL before running it with run_sql. For zero-key operation, use get_semantic_context and write the SQL yourself; to also execute and interpret in one step, use ask. Returns the generated SQL plus supporting details.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
questionYesNatural-language question to translate into SQL.

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint and openWorldHint, and description aligns by stating it does not execute. Adds that it requires an LLM provider and returns generated SQL plus supporting details. Slight gap: no mention of rate limits or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, each delivering distinct information: main action, prerequisite, usage alternatives, return. Highly efficient with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a generate-only tool with no output schema, description adequately specifies return type (SQL plus details). Could mention output format or potential errors, but overall sufficient for typical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers both parameters with clear descriptions (100% coverage). Description adds value by suggesting list_connections for connection parameter, and clarifies question is natural-language. No redundancy.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it translates natural-language to SQL without executing, using the server LLM. It explicitly distinguishes from siblings like ask (one-step execute and interpret) and run_sql (executes SQL).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use (review/edit SQL before run_sql) and when-not (zero-key use get_semantic_context, or use ask for single-step). Includes prerequisite (LLM provider configured) and directs to list_connections for available connections.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_semantic_contextA
Read-only

Assemble grounded, SQL-ready context for a question.

Returns the relevant tables/columns, foreign keys, business glossary, metric definitions, value dictionaries, knowledge excerpts, and example queries as formatted text. This is the recommended first step of the lightweight path: take the result, write a read-only SELECT yourself, then call run_sql. Needs no LLM key. For a fully automated answer instead, use ask.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
questionYesThe natural-language question you intend to answer with SQL; used to select the most relevant schema and semantic-layer entries.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true. The description reinforces this by mentioning 'read-only SELECT' and explains the typical workflow. It adds context about the lightweight path but does not disclose additional behavioral traits beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, well-structured, and front-loaded with the main purpose. Each sentence adds value without redundancy. It efficiently conveys the tool's role, output, and workflow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description adequately covers the tool's return values (tables, columns, foreign keys, etc.) and explains the workflow. Given the presence of an output schema, further detailing return types is unnecessary. The description is sufficient for an agent to understand the tool's role.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptive parameter descriptions. The description adds value by explaining the 'question' parameter is 'used to select the most relevant schema and semantic-layer entries' and that 'connection' should be listed via list_connections, complementing the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool's purpose: 'Assemble grounded, SQL-ready context for a question.' It lists the specific components returned (tables, columns, foreign keys, etc.) and distinguishes itself from sibling tools like 'ask' (fully automated) and 'run_sql' (execution).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear guidance: 'This is the recommended first step of the lightweight path: take the result, write a read-only SELECT yourself, then call run_sql.' It also notes it needs no LLM key and offers an alternative: 'For a fully automated answer instead, use ask.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

introspect_connectionA
Idempotent

Read the target database's structure (tables, columns, foreign keys) and cache it.

Run once per connection before querying, and again after the schema changes. Idempotent — re-running refreshes the cache. The cache is what list_tables, describe_table, and get_semantic_context read from. Returns counts of cached objects plus the number of embeddings generated.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
generate_embeddingsNoAlso build vector embeddings for semantic schema search. Needs an embedding provider; otherwise keyword matching is used.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description adds value beyond annotations by explaining the caching mechanism, idempotency, and dependency chain (cache read by list_tables, describe_table, get_semantic_context). Returns counts of cached objects and embeddings. Consistent with idempotentHint=true and readOnlyHint=false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five concise sentences, each earning its place: purpose, when to use, idempotency, dependency, return value. Front-loaded with the main action, no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with no output schema, the description explains caching, usage timing, return values, and dependencies. Could briefly mention error handling or timeout potential, but overall fairly complete given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The tool description does not add new parameter information beyond what the schema already provides (connection and generate_embeddings). No extra semantics added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it reads and caches database structure (tables, columns, foreign keys). It distinguishes itself from sibling tools like list_tables and describe_table by explaining they read from this tool's cache, establishing it as a prerequisite.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises to 'Run once per connection before querying, and again after the schema changes', giving clear when-to-use context. Does not mention when not to use or provide alternatives, but the usage context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_connectionsA
Read-only

List all configured database connections (id, name, type, limits).

Call this first to discover which databases exist and to get the name or id that every other tool's connection argument accepts. Read-only; returns an empty list when nothing is configured yet (add one with create_connection).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true; description confirms read-only nature and adds detail on return behavior (empty list when none configured). Does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no wasted words. Purpose and usage are front-loaded. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete description for a simple list tool: purpose, usage, behavior, and return information. Output schema exists but description covers all needed context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has zero parameters and 100% coverage, so baseline is 4. No additional parameter information needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it lists configured database connections with specific fields (id, name, type, limits). It distinguishes from sibling tools like create_connection and delete_connection by focusing on discovery.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells to call this first to get connection identifiers needed by other tools. Also handles the empty case by suggesting create_connection as an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_glossaryA
Read-only

List the business glossary terms defined for a connection.

Returns each term, its plain-language definition, the SQL expression that implements it, and related tables. Glossary terms map business language (e.g. 'active customer') to SQL. Add with add_glossary_term; for numeric KPIs see list_metrics. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description confirms 'Read-only.' It adds behavioral context by listing the returned data fields and explaining the glossary concept, but does not discuss potential performance limitations or pagination. Still, it is transparent about the core behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences with clear structure: purpose, return details, context, and guidance. Every sentence adds value, no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with one parameter, output schema present, and good annotations, the description covers all essential aspects: what it does, what it returns, how it relates to siblings, and its read-only nature. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the single parameter 'connection', so the schema already handles parameter semantics. The description mentions 'for a connection' but adds no new meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List', the resource 'business glossary terms', and the scope 'for a connection'. It also details the returned fields and differentiates from sibling tools by mentioning 'Add with add_glossary_term; for numeric KPIs see list_metrics.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use this tool (to list glossary terms) and when not to (add terms or numeric KPIs), providing direct alternatives with sibling tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_knowledgeA
Read-only

List the knowledge documents imported for a connection.

Returns each document's title, source URL, and chunk count. Knowledge docs are searchable business context (policies, data dictionaries, runbooks) used during grounding. Add with add_knowledge or add_knowledge_url. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, and the description explicitly says 'Read-only.' It also specifies the return fields (title, source URL, chunk count), providing transparency beyond annotations. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each serving a purpose: stating the main action, listing return fields, and providing context. No wasted words, well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a single required parameter and the presence of an output schema, the description covers all necessary context: what the tool does, what it returns, and how it fits into the broader set of knowledge management tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds no extra meaning beyond the schema. The schema's parameter description already references list_connections. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List the knowledge documents imported for a connection.' It uses a specific verb ('List') and resource ('knowledge documents'), and distinguishes from sibling tools like add_knowledge or delete_knowledge.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context about knowledge docs being searchable business context and mentions add_knowledge and add_knowledge_url for adding. It implicitly guides usage but does not explicitly state when to use or not use this tool versus alternatives like list_connections.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_metricsA
Read-only

List the metric definitions for a connection.

Returns each metric's name, display name, SQL aggregate expression, and dimensions. Metrics are named, reusable KPIs. Add with add_metric; for phrase-to-SQL term mappings see list_glossary. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true. Description reinforces with 'Read-only' and adds return structure details beyond annotations. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: first defines purpose, second details returns. Every sentence adds value; no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full schema coverage, annotations, output schema presence, and only one parameter, the description provides all necessary context. It mentions related tools (add_metric, list_glossary) for completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage of the single parameter, including guidance to list_connections. The description does not add extra parameter info, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List the metric definitions for a connection' and enumerates exactly what each metric's returned data includes (name, display name, SQL aggregate, dimensions). It distinguishes from siblings like add_metric and list_glossary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance: 'Add with add_metric; for phrase-to-SQL term mappings see list_glossary.' It also declares the tool as read-only, implying safe use. Though it doesn't exhaustively list when not to use, the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_sample_queriesA
Read-only

List saved example natural-language -> SQL pairs for a connection.

These validated pairs are used as few-shot examples that steer SQL generation. Add with add_sample_query. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true. Description adds context that these are validated pairs used for few-shot examples, enhancing understanding beyond the annotation flag.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences with no wasted words. Purpose is front-loaded, and additional context follows efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple single-parameter tool with an output schema, the description adequately covers what the tool does and its purpose. Minor omission of potential filtering details, but not necessary for core understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the connection parameter described in the schema. Description does not add further parameter information, so baseline score is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'List' and clearly identifies the resource as 'saved example natural-language -> SQL pairs' for a connection. It distinguishes itself from sibling tools like add_sample_query and generate_sql.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states that these pairs are used as few-shot examples for steering SQL generation and directs to add_sample_query for addition. Also notes the tool is read-only, providing clear usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesA
Read-only

List a connection's cached tables, each with its columns.

Returns name, type, comment, row-count estimate, and per-column details (type, nullability, primary key). Reads the cache from introspect_connection (run that first if the result is empty). Use for a schema-wide overview; for one table's foreign keys and relationships, use describe_table. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations mark readonly, and description confirms read-only. Description adds behavioral context: reads cache from introspect_connection. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded with purpose then details. Each sentence adds value. No fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter, the description covers purpose, output, usage, and prerequisites. Output schema exists, so return details are supplementary. Complete guidance for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single parameter 'connection' is well-described in schema (name or id, case-insensitive, list_connections for options). Description doesn't add extra beyond schema, but schema coverage is 100%, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool lists cached tables with columns, including specific details returned. Distinguishes from sibling describe_table by noting it's for schema-wide overview vs. one table's relationships.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use (schema-wide overview) and when not (use describe_table for one table's foreign keys). Also mentions prerequisite: run introspect_connection first if cache empty.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

query_historyA
Read-only

List recent query executions for a connection, newest first.

Returns each execution's question, final SQL, status, row count, and timestamp. Use to review or reuse previously run queries. Read-only.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
limitNoMaximum number of past executions to return (newest first).

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description declares 'Read-only' and lists returned fields (question, final SQL, status, row count, timestamp). This adds detail beyond annotations' readOnlyHint, offering practical behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences: main action, return fields, usage hint. Front-loaded and no redundant phrases.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given output schema exists, description sufficiently covers purpose, return fields, and read-only nature. No missing context for a simple listing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers both parameters with comprehensive descriptions (connection with examples, limit with default). Description adds no new parameter info, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'List recent query executions for a connection, newest first.' It specifies verb, resource, and ordering, distinguishing it from siblings like run_sql and list_connections.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use to review or reuse previously run queries.' This provides clear context, though it stops short of specifying when not to use it or direct alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_sqlA
Read-only

Execute a read-only SQL SELECT against the target database and return the rows.

Use to run SQL you wrote from get_semantic_context. Enforces read-only: rejects INSERT/UPDATE/DELETE/DDL and other unsafe statements; results are row-limited per the connection's max_rows. Returns columns, rows, row_count, truncated, and execution_time_ms. To have the server write the SQL for you, use generate_sql or ask.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
sqlYesA single read-only SELECT statement to execute. Non-SELECT or unsafe SQL is rejected.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations (readOnlyHint: true), the description adds that it rejects unsafe statements, is row-limited, and returns specific fields (columns, rows, row_count, truncated, execution_time_ms). No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, each sentence provides essential information without redundancy. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description lists return fields. It covers purpose, usage, safety, and return format, making it complete for this straightforward tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description does not add new meaning beyond schema descriptions for the two parameters; it only reiterates the constraints already present in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Execute a read-only SQL SELECT against the target database and return the rows,' specifying a specific verb, resource, and scope. It distinguishes itself from siblings like generate_sql which writes SQL.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use to run SQL you wrote from get_semantic_context' and recommends generate_sql or ask for server-written SQL, providing clear when-to-use and alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

test_connectionA
Read-only

Check that a configured connection can be reached and authenticated.

Use after create_connection to validate credentials and network access before introspecting. Read-only: opens and closes a probe connection without reading the schema (use introspect_connection for that). Returns {success, message}.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations include readOnlyHint=true. The description adds context: 'opens and closes a probe connection' and returns {success, message}, enhancing transparency beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with front-loaded main action and efficient structure. Every sentence adds value, no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With one simple parameter, clear return value indicated, and good annotations, the description is complete for this tool's context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a well-described parameter. The description does not add additional semantic value beyond the schema, warranting baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: checking connection reachability and authentication. It distinguishes from siblings like create_connection and introspect_connection by specifying what it does not do (reading schema).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly suggests using after create_connection and before introspecting. Contrasts with introspect_connection, providing clear when-to-use and when-not-to-use guidance.

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.

  1. 24 tool updates
    • Changedadd_dictionary_entry6 fields changed
      • addedInput schema / properties / column_name / description
        Added value: +"Column whose coded value you are explaining."
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / description / description
        Added value: +"Optional extra explanation of the value."
      • addedInput schema / properties / display_value / description
        Added value: +"The business meaning of that value (e.g. 'Performing')."
      • addedInput schema / properties / raw_value / description
        Added value: +"The stored/coded value as it appears in the column (e.g. '1')."
      • addedInput schema / properties / table_name / description
        Added value: +"Table containing the column (must already be introspected)."
    • Changedadd_glossary_term5 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / definition / description
        Added value: +"Plain-language meaning of the term."
      • addedInput schema / properties / related_tables / description
        Added value: +"Optional list of table names the term applies to."
      • addedInput schema / properties / sql_expression / description
        Added value: +"SQL snippet/predicate that implements the term (e.g. a WHERE condition)."
      • addedInput schema / properties / term / description
        Added value: +"The business term being defined (e.g. 'active customer')."
    • Changedadd_knowledge4 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / content / description
        Added value: +"Document body as plain text or HTML; it is chunked and indexed for search."
      • addedInput schema / properties / source_url / description
        Added value: +"Optional source URL to record as provenance."
      • addedInput schema / properties / title / description
        Added value: +"Title for the knowledge document."
    • Changedadd_knowledge_url3 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / title / description
        Added value: +"Optional title; defaults to the URL."
      • addedInput schema / properties / url / description
        Added value: +"Public URL to fetch server-side and import."
    • Changedadd_metric7 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / description / description
        Added value: +"Optional explanation of what the metric measures."
      • addedInput schema / properties / dimensions / description
        Added value: +"Optional dimensions to group the metric by (e.g. ['region','month'])."
      • addedInput schema / properties / display_name / description
        Added value: +"Human-friendly metric label (e.g. 'Gross Revenue')."
      • addedInput schema / properties / metric_name / description
        Added value: +"Machine-friendly metric identifier (e.g. 'gross_revenue')."
      • addedInput schema / properties / related_tables / description
        Added value: +"Optional list of table names the metric is computed from."
      • addedInput schema / properties / sql_expression / description
        Added value: +"SQL aggregate expression implementing the metric (e.g. SUM(amount))."
    • Changedadd_sample_query4 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / description / description
        Added value: +"Optional note about the example."
      • addedInput schema / properties / natural_language / description
        Added value: +"Example question in natural language."
      • addedInput schema / properties / sql_query / description
        Added value: +"Correct, validated SQL that answers the question."
    • Changedask2 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / question / description
        Added value: +"Natural-language question to answer end-to-end."
    • Changedcreate_connection6 fields changed
      • addedInput schema / properties / connection_string / description
        Added value: +"Driver URL (PostgreSQL/MySQL) or connector-specific JSON config (BigQuery/Databricks). Stored encrypted at rest."
      • addedInput schema / properties / connector_type / description
        Added value: +"One of: postgresql, bigquery, databricks, mysql, snowflake."
      • addedInput schema / properties / default_schema / description
        Added value: +"Default schema to introspect and query when none is specified."
      • addedInput schema / properties / max_query_timeout_seconds / description
        Added value: +"Per-query timeout, in seconds, for this connection."
      • addedInput schema / properties / max_rows / description
        Added value: +"Maximum number of rows any query on this connection may return."
      • addedInput schema / properties / name / description
        Added value: +"Unique, human-friendly name used to reference this connection later."
    • Changeddelete_connection1 field changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
    • Changeddelete_glossary_term1 field changed
      • addedInput schema / properties / term_id / description
        Added value: +"Id of the glossary term to delete (from list_glossary)."
    • Changeddelete_knowledge1 field changed
      • addedInput schema / properties / doc_id / description
        Added value: +"Id of the knowledge document to delete (from list_knowledge)."
    • Changeddelete_metric1 field changed
      • addedInput schema / properties / metric_id / description
        Added value: +"Id of the metric to delete (from list_metrics)."
    • Changeddescribe_table2 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / table_name / description
        Added value: +"Exact table name to describe, as shown by list_tables."
    • Changedgenerate_sql2 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / question / description
        Added value: +"Natural-language question to translate into SQL."
    • Changedget_semantic_context2 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / question / description
        Added value: +"The natural-language question you intend to answer with SQL; used to select the most relevant schema and semantic-layer entries."
    • Changedintrospect_connection2 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / generate_embeddings / description
        Added value: +"Also build vector embeddings for semantic schema search. Needs an embedding provider; otherwise keyword matching is used."
    • Changedlist_glossary1 field changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
    • Changedlist_knowledge1 field changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
    • Changedlist_metrics1 field changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
    • Changedlist_sample_queries1 field changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
    • Changedlist_tables1 field changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
    • Changedquery_history2 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of past executions to return (newest first)."
    • Changedrun_sql2 fields changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
      • addedInput schema / properties / sql / description
        Added value: +"A single read-only SELECT statement to execute. Non-SELECT or unsafe SQL is rejected."
    • Changedtest_connection1 field changed
      • addedInput schema / properties / connection / description
        Added value: +"Target database connection — its name or id (case-insensitive). List the available connections with list_connections."
  2. 25 tool updatesv1.0.0
    • First observedadd_dictionary_entry
    • First observedadd_glossary_term
    • First observedadd_knowledge
    • First observedadd_knowledge_url
    • First observedadd_metric
    • First observedadd_sample_query
    • First observedask
    • First observedcreate_connection
    • First observeddelete_connection
    • First observeddelete_glossary_term
    • First observeddelete_knowledge
    • First observeddelete_metric
    • First observeddescribe_table
    • First observedgenerate_sql
    • First observedget_semantic_context
    • First observedintrospect_connection
    • First observedlist_connections
    • First observedlist_glossary
    • First observedlist_knowledge
    • First observedlist_metrics
    • First observedlist_sample_queries
    • First observedlist_tables
    • First observedquery_history
    • First observedrun_sql
    • First observedtest_connection

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a distinct, well-defined purpose covering different aspects of the semantic layer (connections, glossary, metrics, knowledge, sample queries, SQL generation, execution). No two tools appear to do the same thing.

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern with snake_case (e.g., add_dictionary_entry, delete_connection). The tool 'ask' breaks this pattern as a single verb, but it's a notable exception amidst overall consistency.

Tool Count4/5

25 tools is on the higher side but justifiable for a comprehensive semantic layer that includes CRUD for multiple entity types, schema introspection, and query execution. The count is not excessive given the scope.

Completeness3/5

Core workflows are well-covered (setup, add semantics, query), but there are gaps: no update tools for glossary, metrics, or knowledge; no list or delete for dictionary entries; no edit for connections. These omissions could hinder workflows slightly.

Maintenance

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to understand and query your database safely by providing a semantic layer of metadata, with tools to search, explain, validate, and generate safe SQL.
    2
    MIT
  • F
    license
    A
    quality
    A
    maintenance
    Natural language to SQL engine with multi-connector support (PostgreSQL, MySQL, Snowflake, BigQuery, DuckDB), document QA, semantic caching, and self-hosted MCP server.
    9
    3
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables natural language querying of SQL databases with robust safety guarantees including read-only enforcement, AST validation, and row caps.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to query business databases directly via natural language, with enforced read-only access and secure query limits. Supports SQLite and PostgreSQL, and works with any OpenAI-compatible model.
    0
    ISC

Latest Blog Posts

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/kosminus/querywise-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server