Skip to main content
Glama

Bond Cash Flow Duration

bpj_bond_cashflow_duration
Read-onlyIdempotent

Weight annual coupons and principal by their discounted payment dates to estimate Macaulay and modified duration.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "face": "<face>",
      "coupon": "<coupon>",
      "yieldRate": "<yieldRate>",
      "years": "<years>"
    },
    "name": "bpj_bond_cashflow_duration"
  }
}

Input Schema

NameRequiredDescriptionDefault
faceYes
yearsYes
couponYes
yieldRateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety profile is covered. The description adds that the computation is a discounted-cash-flow weighting, but omits key behavior: assumed annual coupon frequency, redemption at par, compounding convention, and what exactly is returned (two scalars, ordering, precision). The verb 'estimate' also undersells that the result is a deterministic calculation.

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?

A single tight sentence with no filler and the method stated up front. It is efficient, though the method narrative crowds out the more useful statement of what is returned.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With four required numeric parameters, no output schema, and zero schema descriptions, the definition needs to carry the assumptions and return contract itself. It does not, leaving an agent to guess at coupon frequency, compounding, and the shape of the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% — parameters carry only short titles. The description references coupons, principal, and payment dates but never maps these to face, coupon, yieldRate, or years, nor clarifies units beyond the titles, whether fractional years are allowed, or that face is notional rather than price.

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 names a specific computation and its two deliverables: Macaulay and modified duration for an annual-coupon bond. It is clear enough to distinguish from a pricing tool in principle, but it does not explicitly contrast with siblings such as bpj_annual_coupon_bond_price or bpj_units_duration.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no statement of prerequisites, and no pointer to alternatives. An agent cannot tell from the text whether this supersedes bpj_units_duration or should be used alongside the bond-pricing tool.

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.