Skip to main content
Glama

answer

Read-onlyIdempotent

Question in, rows out: selects the schema, writes the SQL with the server's own configured model, and runs it, all scoped to the caller. Only available when the server has a model configured; most clients should use select_schema then run_query with their own model instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rolesNoThe caller's roles or groups, e.g. ['finance', 'payroll']. Objects and columns restricted to a role are visible only when it is listed here. Omitted = no roles.
top_kNoHow many tables and views to select for the question (default 6). Raise it for questions that span many areas; the caller's visible objects are the upper bound.
max_rowsNoMost rows to return (default 50, at most 200). The result says when it was truncated.
questionYesThe user's question in plain language, e.g. 'revenue by month' or 'which customers owe us money'.
principalNoWho is asking, as an identity string such as 'okta:jdoe'. Pass it whenever you know the user: visibility is decided for this identity. Omitted = anonymous, which sees only unrestricted objects.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description still adds valuable context the annotations cannot: the operation runs a server-side model, is scoped to the caller, and is gated on server configuration. It does not describe failure modes or how a missing model surfaces, keeping it short of a 5.

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 the input/output contract before the pipeline and the caveats. Every clause earns its place: pipeline, scoping, precondition, and alternative, with no repetition of schema or annotation content.

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 five-parameter tool with a full input schema, an output schema, and rich annotations, the description supplies exactly what the structured fields do not: the model-configuration precondition, the caller-scoping semantics, and the sibling routing. Return values are covered by the output schema, so no explanation is needed.

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 schema already fully documents question, roles, principal, top_k and max_rows. The description's only parameter-relevant contribution is the framing that everything is "scoped to the caller," which lightly reinforces principal/roles but adds no syntax or format detail beyond the schema. 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?

The description names a concrete input and output ("Question in, rows out") and spells out the full internal pipeline: schema selection, SQL generation by the server's model, execution, all caller-scoped. It also implicitly separates itself from the sibling tools by naming select_schema and run_query as the manual alternative.

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?

It states an explicit availability precondition ("Only available when the server has a model configured") and an explicit routing rule for most clients ("use select_schema then run_query with their own model instead"). When-to-use and when-not-to-use are both present with the alternatives named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources