Skip to main content
Glama

fetch_query

Read-only

Run read-only FetchXML queries against an allowlisted environment and retrieve result rows as dictionaries. Enforces a row cap and sorts client-side.

Instructions

Run a read-only FetchXML query against an allowlisted environment (pac env fetch) and return rows as dicts. FetchXML cannot modify data. Rows are capped at max_rows (default from config, ceiling 5000): pac itself ignores top/count/page and would page through every record, so the server stops reading at the cap. pac also ignores ; the server sorts client-side when the result is complete. Values are pac's formatted strings. Prefer filters and explicit lists; the primary key column is always appended.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fetchxmlYes
max_rowsNo
environmentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Even though readOnlyHint already marks it as read-only, the description adds substantial behavioral detail: pac ignores top/count/page, rows are capped, <order> is ignored, results are client-side sorted, and values are formatted strings. These are non-obvious execution details an agent needs before calling the tool.

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?

The description is dense but every sentence adds a distinct, useful fact: purpose, output shape, row cap behavior, ordering behavior, formatting, and query best practice. The core purpose is front-loaded, and no filler is present.

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?

Given the lack of an output schema, the description covers return shape and key execution limits reasonably well. It omits minor details such as how to specify the environment or exact error behavior, but these are not critical for a read-only query tool whose annotations already signal safety.

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 0% schema description coverage, the description must compensate for undeclared parameter meanings. It clarifies max_rows defaults and ceiling, explains that pac pages through all records, and advises FetchXML authoring with filters and explicit attributes. The environment parameter gets only generic 'allowlisted' context, leaving some gap.

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 action—running a read-only FetchXML query against an allowlisted environment—and states the output format as rows of dicts. It clearly distinguishes this tool from sibling metadata/management tools like list_tables, describe_table, and export_solution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The read-only nature and 'FetchXML cannot modify data' statement imply this is for safe data retrieval, but the description does not explicitly compare it to alternatives or state when to avoid it. Usage guidance is present mostly for query authoring, not for tool selection against siblings.

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