Skip to main content
Glama

build_query

Creates a validated CurveQuerySpec for bootstrap_curve, letting you request discount factors, zero rates, or forwards by tenor or date range without an engine call.

Instructions

A CurveQuerySpec for bootstrap_curve (no engine call).

Args: curve_id: the curve to sample. measures: any of DF, ZERO, FWD. tenors: TenorGrid, e.g. ["1M", "6M", "1Y", "5Y", "10Y"]; needs calendar + business_day_convention to roll each tenor. range_grid: RangeGrid alternative {end_date, step_number, step_time_unit, start_date?, business_days_only?, calendar?, ...}. zero: options for ZERO (default: continuous, annual, curve day counter). fwd: required when FWD is requested (forward_type Period + tenor, or Instantaneous + eps; compounding; frequency).

Returns {ok, query, notes}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fwdNo
zeroNo
tenorsNo
calendarNo
curve_idYes
measuresYes
range_gridNo
business_day_conventionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the safety burden, and it does disclose the key behavioral fact that no engine call is made and that it returns {ok, query, notes}. It does not state whether the result persists, is executed later, or has any side effects, which leaves a gap for a builder that feeds a downstream operation.

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?

It is front-loaded with the one-line purpose, then an Args block whose entries earn their place, closing with the return shape. The style is a dense docstring with clause-per-line, which is appropriate and wastes little.

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 8-parameter query builder, the description covers the parameters well and notes the return tuple, and an output schema exists so return details need not be expounded. The remaining gap is operational context (how the produced query is consumed and any constraints on it), which the sibling noise makes harder to infer.

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?

Schema description coverage is 0%, so the description must compensate, and it does substantially: it defines curve_id, the DF/ZERO/FWD measures, the tenors grid plus the calendar/business_day_convention requirement to roll tenors, the range_grid alternative, and the zero/fwd option blocks including the Period vs Instantaneous forward_type rule. Most of the 8 parameters gain meaning beyond the bare 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 opening line 'A CurveQuerySpec for bootstrap_curve (no engine call)' names the artifact produced and the parent operation, and the '(no engine call)' clause distinguishes it from the bootstrap_curve sibling. It is precise, though the jargon 'CurveQuerySpec' assumes domain familiarity rather than describing in plain terms.

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 '(no engine call)' note implies this is a construction step separate from bootstrap_curve, which is useful context, but the description never states explicitly when to reach for build_query versus calling bootstrap_curve or the other build_* siblings. Usage is implied, not spelled out.

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