Skip to main content
Glama

Описание результата запроса

describe_query_result
Read-onlyIdempotent

Inspect a JSONata query result before refining it: returns type, total count, field coverage across the first 100 records, and sample values to clarify uncertain result shapes.

Instructions

Когда вызывать: ПЕРЕД seaf_jsonata_query, когда не уверены в форме результата запроса. Возвращает тип (array/object/scalar/missing), count по всему результату, поля с покрытием present_in k/n по первым 100 элементам и до 3 примеров (≤1500 символов каждый); схема строится по выборке — это разведка, а не полная схема. Терминальные агрегаты ($count, $sum) — скаляр в value. Дальше: seaf_jsonata_query с уточнённым запросом.

Input Schema

NameRequiredDescriptionDefault
queryYesВыражение JSONata (корневой $ — манифест)
query_goalNoЗачем нужен запрос (опционально, для контекста)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/non-destructive, and the description adds real substance on top: sampling over the first 100 elements, coverage as present_in k/n, up to 3 examples capped at 1500 chars, and an explicit caveat that the schema is reconnaissance, not a complete schema. It also discloses that terminal aggregates ($count, $sum) surface as a scalar in value.

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?

Front-loads the trigger condition ('Когда вызывать') before the return-shape details and closes with the follow-up action. Dense but every clause (sampling size, example cap, aggregate caveat) carries distinct information.

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?

No output schema exists, yet the description fully specifies the return value: type enumeration, total count, per-field coverage, and example limits. An agent knows both when to call it and exactly what it will get back.

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% for both parameters, so the schema already documents query and query_goal. The description adds context about the JSONata expression behavior for aggregates but gives no extra syntax or format detail for the parameters themselves, so the 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?

States a specific verb and resource (describe the shape of a query result) and immediately contrasts it with the sibling seaf_jsonata_query, which executes queries. An agent can tell the two apart without opening either 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?

Explicit ordering and condition: call this BEFORE seaf_jsonata_query when unsure of the result shape, then follow up with seaf_jsonata_query using a refined query. Both the when and the next step are named.

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