Skip to main content
Glama

Governed semantic query

query_semantic
Read-onlyIdempotent
Run a governed query against the semantic layer: choose an entity, then
the metrics, dimensions and filters you want. Aliases are resolved to
physical columns by the registry, so this cannot reach anything the
semantic model does not expose. The result includes the generated SQL.

Prefer this over `query_sql` — it is cheaper, bounded, and self-describing.
UK only. Costs 50 credits. You are charged if the query reaches the
warehouse and then times out or errors there; a rejected query is free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
joinsNo
limitNo
entityYes
periodNo
selectNo
filtersNo
metricsNo
order_byNo
dimensionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint, so the safety profile is covered. The description goes beyond them with genuinely useful behavior: alias resolution confines access to what the semantic model exposes, the response contains generated SQL, and there is a specific cost/billing model tied to warehouse timeouts and errors.

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 compact sentences, front-loaded with what the tool does before routing advice and cost rules. No sentence is filler; each one changes how an agent would call or choose the tool.

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?

With an output schema present, the description needn't explain return values, and the note that the result includes generated SQL is a useful hint. The gap is the un-narrated top-level parameters (joins, period, limit, select), which leaves an agent guessing on the less obvious inputs.

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 0% at the top level, so the description must compensate and only partly does: it names entity, metrics, dimensions and filters, but leaves joins, period, select, order_by and limit unexplained. The nested OrderBy/SemanticFilter types are richly documented, but that credit belongs to the schema, not the description.

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 specific verb and resource ('run a governed query against the semantic layer') and immediately explains the operating model: pick an entity, then metrics/dimensions/filters. It explicitly contrasts with the sibling `query_sql`, so an agent can distinguish the two without opening a 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?

It names the alternative directly ('Prefer this over `query_sql`') and gives the criteria that select it (cheaper, bounded, self-describing). Scope ('UK only') and cost (50 credits, billing on warehouse timeout/error, free if rejected) further constrain when an agent should commit to this call.

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