Skip to main content
Glama
igorolv

jdbc-mcp-server

queryContext

queryContext
Read-onlyIdempotent

Build multi-table SQL-authoring context from natural-language terms or an explicit table list. Use when relevant tables are unknown or a request spans several tables.

Instructions

Build multi-table SQL-authoring context from natural-language terms or an explicit table list. Use when relevant tables are unknown or a request spans several tables; for one known table's fields or structure, use describeTable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termsNoUser terms, e.g. 'customers order totals'.
schemaNo
tablesNoForce-include tables (CSV), e.g. customers,orders.
maxTablesNoTables to include (default 12).
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.
includeSamplesNoInclude up to 3 rows per table (default false).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
termsNoNatural-language terms used to select relevant schema context.
schemaNo
tablesNoTables included in this context, graph, query inspection, or usage record.
joinPathsNoShortest or suggested join paths between selected tables.
tableCountYesNumber of tables selected into the query context.
relationshipsNoRelationship edges relevant to the context, graph, or observed-relationships result.
includeSamplesYesTrue when small sample rows were requested for selected tables.
requestedTablesNoExplicit table names requested by the caller for query context.
semanticMatchesNoTables matched by semantic usage-catalog terms before final context assembly (opaque).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already establish readOnly/idempotent/non-destructive behavior, so the description need not repeat safety information. It adds behavioral context that this is a context-building/selection operation rather than a query or analysis operation, and clarifies the multi-table scope. It does not detail all internal behavior, but that is not required given the rich 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 no filler, and the core operation plus the primary usage condition appear first. Every sentence earns its place by either defining the tool or guiding routing.

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 read-only schema-introspection tool with an output schema, six parameters, and strong annotations, the description plus input schema fully cover selection and invocation. The only required parameter (connection) is marked required and referenced in its own schema description with a pointer to listConnections.

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 83%, and the schema already documents terms, tables, maxTables, connection, and includeSamples. The description adds only a high-level mapping from terms/tables to the purpose, which is useful but not materially beyond the schema; 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 opens with a specific verb and object ('Build multi-table SQL-authoring context') and specifies two input modes (natural-language terms, explicit table list). It names describeTable as the alternative, so the tool is distinguishable from its closest sibling without opening the 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?

'Use when relevant tables are unknown or a request spans several tables' gives explicit trigger conditions, and 'for one known table's fields or structure, use describeTable' gives an explicit exclusion and alternative. No inference is required.

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