Skip to main content
Glama

Run a spending query

run_plan
Read-onlyIdempotent

Run a QueryPlan (see get_catalog.plan_schema). Returns status (ok | clarify | unsupported | error), a one-paragraph answer, columns, rows (max 100), the SQL that ran, caveats and how names were resolved to codes.

Input Schema

NameRequiredDescriptionDefault
planYesA QueryPlan object in business terms, following get_catalog's plan_schema, e.g. {"intent": "aggregate", "metric": "obligations", "group_by": ["agency"], "fiscal_years": [2025], "filters": [{"dimension": "award_category", "values": ["contract"]}]}.

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?

With annotations already covering read-only and idempotent behavior, the description adds substantial return-value context: status values (ok, clarify, unsupported, error), a one-paragraph answer, columns, rows capped at 100, the executed SQL, caveats, and name-resolution details. This is especially valuable because there is no output schema.

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 two compact sentences, front-loads the action, and then efficiently enumerates the return contract. Every clause carries useful information.

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?

For a complex nested QueryPlan with no output schema, the description covers the plan source and enumerates the return fields well. It could go further by explaining how to handle clarify or unsupported statuses, but it is sufficiently complete for 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?

Schema coverage is 100% and the plan parameter already includes an example and a reference to get_catalog's plan_schema. The description repeats the same reference but adds no additional parameter syntax or constraints beyond the schema.

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 states a specific verb and resource: 'Run a QueryPlan' for a spending query. It also distinguishes the tool from get_catalog by pointing to get_catalog.plan_schema for the plan structure.

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 reference to get_catalog.plan_schema implies that a plan must come from the catalog, but the description does not explicitly say when to use run_plan instead of siblings such as get_catalog, search_far, or browse_codes. Usage is implied rather than spelled out.

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