Skip to main content
Glama
igorolv

jdbc-mcp-server

findQueriesByColumn

findQueriesByColumn
Read-onlyIdempotent

Locate stored SQL queries referencing a specific column, and identify its use in SELECT, WHERE, JOIN, ORDER BY, or HAVING clauses.

Instructions

Find stored application/report queries that actually reference one column and show whether it appears in SELECT, WHERE, JOIN, ORDER BY or HAVING. Use describeTable to discover declared columns; schema/table filters are optional and case-insensitive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableNo
columnYes
schemaNo
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYesNumber of matching catalog queries returned for the column.
tableNoTable containing the searched column.
columnNo
schemaNo
matchesNoUsage-catalog matches returned for the requested table, column, or filter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds meaningful details beyond that: it searches stored queries rather than live data, checks specific SQL clauses, and emphasizes that column references are 'actual' rather than merely declared. This aligns with annotations and enriches the agent's expectations.

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, front-loads the core behavior in the first sentence, and uses the second sentence for actionable guidance. Every phrase earns its place with no repetition of schema or annotation details.

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 presence of an output schema, return-value details are not required. The description covers scope, filtering behavior, and a discovery workflow. It is slightly incomplete in not explicitly steering the agent away from sibling tools like findQueriesByTable, but the core calling context is sufficiently covered.

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 description coverage is only 25%, so the description must compensate. It clarifies that 'column' is the search target and that schema/table act as optional, case-insensitive filters. The connection parameter is already documented in the schema, but the description could still say more about how table/schema values are matched.

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: find stored application/report queries that reference one column and show where the column appears (SELECT, WHERE, JOIN, ORDER BY, HAVING). This specific verb+resource combination distinguishes it from sibling tools like findQueriesByTable and searchObjects.

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 gives useful context: use describeTable to discover declared columns, and schema/table filters are optional and case-insensitive. It does not explicitly name alternatives or exclusions, but the workflow and filter behavior are clear enough for an agent to call it appropriately.

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