Skip to main content
Glama

curve_from_pasted_table

Build discount, zero, or par curves from pasted market-data tables by parsing rows, validating quotes, and reporting unparsed data for pricing workflows.

Instructions

A curve from a table the user pasted (a vendor curve screen, a spreadsheet, a ticket): parses it and calls build_value_curve (discount / zero) or build_curve (par quotes). No engine call; no arithmetic on the values.

Args: text: the pasted rows. CSV / TSV / ';' / '|' / whitespace separated, header optional. Each row: a date (2034-09-18, 18-Sep-2034, 09/18/2034 with date_format) or a tenor (10Y), then the value. % values are divided by 100; 1,000.5 loses its commas. An optional word per row (ois, swap, deposit) tags a par quote's type. id: curve id to register. kind: discount (discount factors -> InterpolatedDiscount), zero (zero rates -> InterpolatedZero) or par (market quotes -> bootstrap helpers of the preset). market_data_source: where the market numbers in this call come from. user_pasted (the user pasted or typed the numbers in this conversation), user_file (the user attached a file/screenshot the numbers were read from), engine_example (an engine example's pricing block, only when the user explicitly asked to run an example), session (a market previously stored in this session, which itself came from one of the above). There is no value for estimated, recalled or placeholder data. If you would have to invent numbers, do not call this tool: ask the user for the data. preset: supplies the curve day counter and point calendar/convention (USD_SOFR_OIS...); required for par; or give conventions. reference_date: the curve / as-of date. For discount it may be omitted when the first row is that date with value 1.0. quote_type: par tables only: the helper type when the rows do not name one and the preset offers several. percent: true = every value is a percentage; default: only values written with %. date_format: mdy / dmy for slash dates; inferred when a field exceeds 12, otherwise required. compounding, frequency: zero tables only (default Continuous / Annual). interpolator: override the builder default.

Returns the builder result ({ok, curve, indices, preset, notes}) plus parsed_rows (line, label, value as read), unparsed (line, text, reason) and header. For a discount table whose first row is not the reference date, the anchor point {reference_date: 1.0} the engine requires is added in front and said so in notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
kindYes
textYes
presetNo
percentNo
frequencyNo
quote_typeNo
compoundingNo
conventionsNo
date_formatNo
interpolatorNo
reference_dateNo
market_data_sourceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: it states 'No engine call; no arithmetic on the values,' identifies the id registration side effect, and documents edge-case behavior (the anchor point {reference_date: 1.0} added and reported in notes). It also discloses what the parse produces and how unparsed rows surface.

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?

Front-loads the one-line purpose before an Args block, and every sentence is load-bearing given thirteen undocumented parameters. The terse notation keps it dense without padding; nothing reads as filler.

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

Completeness5/5

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

For a high-complexity curve-construction tool with 13 params, 0% schema coverage, and no annotations, this covers input syntax, routing, provenance constraints, and return behavior. The output schema exists, yet the description still orients the agent to the return shape and notes without that being required.

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

Parameters5/5

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

Schema description coverage is 0% across 13 parameters, so the description must compensate entirely — and it does, documenting text separators, accepted date formats, % and comma handling, per-row type tags, the three kind values, every market_data_source value, preset vs conventions, reference_date omission rules, quote_type fallback, percent, date_format inference, and compounding/frequency scope per kind.

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?

States a specific verb and resource — it parses a user-pasted table and routes it to build_value_curve or build_curve — and explicitly names the two builder siblings, so an agent can distinguish it from them without opening a schema. The parenthetical examples (vendor screen, spreadsheet, ticket) make the input source unambiguous.

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?

Gives a clear use context and a strong explicit when-not rule: 'If you would have to invent numbers, do not call this tool: ask the user for the data,' plus a typology of market_data_source with the meaning of each value. It does not explicitly say when to prefer calling build_value_curve directly with clean values, so routing vs the sibling builders is left partly to inference.

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