Skip to main content
Glama

Safe Rate

Price a Treasury security

price_treasury_security
Read-onlyIdempotent

Convert between price and yield for a Treasury bill, note or bond. Supply exactly one side — a price or a yield (a discount rate for a bill) — and the other is returned, with accrued interest, dirty price and the investment rate as applicable. For a note or bond, a CUSIP looks the terms up instead of restating them.

Input Schema

NameRequiredDescriptionDefault
cusipNoCUSIP of a note or bond; its terms are looked up.
frequencyNoCoupon payments per year. Defaults to 2.
instrumentYes"bill" for a discount instrument under a year, "coupon" for a note or bond. The maths differs; the wrong choice returns a plausible wrong number.
trade_dateNoSettlement date. Defaults to the most recent trading day.
clean_priceNoPrice per 100 of face, excluding accrued interest.
maturity_dateNoMaturity, YYYY-MM-DD. Required for a bill.
yield_percentNoYield to maturity for a coupon security.
coupon_rate_percentNoAnnual coupon rate. Required for a coupon security without a CUSIP.
discount_rate_percentNoBank discount rate for a bill.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, and destructiveHint false, so the safety profile is known. The description adds useful behavioral context beyond that: the exactly-one-input constraint and the returned accrued interest, dirty price, and investment rate where applicable.

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?

Three dense sentences, front-loaded with the core conversion behavior and followed by the input constraint and the CUSIP shortcut. No sentence is redundant.

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 nine-parameter pricing tool with no output schema, the description explains the output components and the central input rule, which is enough for an agent to call it correctly. It could be more explicit about which parameter sets are required for bills versus coupon securities, but the schema covers much of that.

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 100% schema description coverage, the baseline is 3, but the description adds a meaningful cross-parameter constraint not encoded in the schema: supply exactly one of price or yield. It also clarifies that a bill uses a discount rate while a note or bond can use a CUSIP lookup.

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 states a specific verb-plus-resource: converting between price and yield for Treasury bills, notes, and bonds. It clearly distinguishes the security types and the two directions of calculation, though it does not explicitly name sibling tools such as get_treasury_security or get_treasury_curve.

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 clear usage context: supply exactly one side, either a price or a yield, with a discount rate for a bill, and use a CUSIP for a note or bond to avoid restating terms. It does not name alternative tools or explain when a caller should use get_treasury_security instead.

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