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.

Bounded and self-describing.
UK only. Costs 50 credits (50p). You are charged if the query reaches the
warehouse and then times out or errors there; a rejected query is free,
and so is one that matches no rows. Filter area facts on the
`analytics_area_id` from area_resolve; they are monthly, so a year
("2025") or quarter is widened to its months.

Input Schema

NameRequiredDescriptionDefault
joinsNo
limitNo
entityYes
periodNo
selectNo
filtersNo
metricsNo
order_byNo
dimensionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the read-only annotations: discloses UK-only scope, a specific cost (50 credits/50p), the exact charging rule on warehouse timeouts/errors, that rejected and zero-row queries are free, and that the response includes generated SQL. This is precisely the billing and scope information an agent needs before calling.

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?

Front-loads purpose, then aliasing, then cost, then the area-facts hint — a sensible order with little waste. The dangling fragment 'Bounded and self-describing.' earns no place and slightly interrupts flow.

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

Completeness3/5

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

An output schema exists so return values needn't be explained, and cost/scope/timing caveats are well covered. However, for a 9-parameter tool with 0% schema coverage, the description leaves core params (joins, select, limit, order_by) undocumented, which is a real gap for correct invocation.

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?

Top-level schema coverage is 0%, and the description only explains some of the 9 params (entity, metrics, dimensions, filters, and implicitly period via the year/quarter widening note). It says nothing about limit, joins, select, or order_by; the nested OrderBy/SemanticFilter defs carry their own docs, but the bare top-level params are left to the schema's titles alone.

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?

States a specific verb+resource ('Run a governed query against the semantic layer') and enumerates the inputs an agent assembles (entity, metrics, dimensions, filters). It clearly positions itself as the generic semantic-model query rather than a specific metric endpoint, distinguishing it from the many named-data siblings.

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?

Gives real usage context: entity-first workflow, alias resolution guarantees only modelled columns, and a concrete pointer to a sibling ('filter area facts on the analytics_area_id from area_resolve'). It does not explicitly state when to prefer this over a purpose-built sibling like market_facts, so it stops short of a 5.

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