Skip to main content
Glama

Query connected systems

query_entity
Read-onlyIdempotent

Runs a read-only query on one entity. select lists fields to return (or group by when measures are given); measures are aggregates such as totals and counts (describe_entity lists them). filters narrow rows with ops eq, ne, gt, gte, lt, lte, in, contains. Dates are YYYY-MM-DD strings. Returns at most 200 rows (default 50); if has_more is true, use fetch_more.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "system": "<system>",
      "entity": "<entity>"
    },
    "name": "query_entity"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNorows to return, default 50, maximum 200
entityYes
offsetNo
selectNofields to return, or to group by when measures are given
systemYessystem id from list_connected_systems
filtersNo
measuresNomeasure names such as committed_cost
order_byNo

Output Schema

NameRequiredDescriptionDefault
rowsYes
entityYes
systemYes
has_moreYes
row_countYes
data_as_ofYes
next_cursorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered structurally. The description still adds genuinely useful behavior: the 200-row ceiling, the default of 50, and the has_more/fetch_more continuation contract. It does not mention permissions, rate limits, or what a partial failure looks like.

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?

The core capability is front-loaded in a single sentence, with parameter semantics and the row-limit contract following in order of importance. Semantically dense with almost no filler, though the parenthetical '(describe_entity lists them)' is easy to miss as a cross-reference.

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?

An output schema exists, so return shape need not be described, and the description correctly limits itself to the pagination signal (has_more) the agent must act on. For an 8-parameter, query-construction tool the remaining gap is conceptual: 'one entity' and the system/entity distinction are never grounded, leaving the agent reliant on list_connected_systems output.

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?

With only 50% schema coverage, the description does real work: it explains that select becomes a group-by when measures are present, that measures are aggregates discoverable via describe_entity, that filters use ops eq/ne/gt/gte/lt/lte/in/contains, and that dates are YYYY-MM-DD. order_by, offset and the system/entity identifiers are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Runs a read-only query on one entity', then enumerates what the query is composed of (select, measures, filters). It is clearly distinguishable from describe_entity (metadata) and fetch_more (pagination), though it never states what an 'entity' actually is.

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?

It gives real routing guidance: use describe_entity to discover measure names, and use fetch_more when has_more is true. What is missing is any exclusion — nothing says when NOT to use this tool or what the prerequisites are for a valid system/entity pair beyond the schema-level pointer to list_connected_systems.

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