Skip to main content
Glama

session_put

Store a named curve, index, or market block in the session so later bootstrap and pricing calls can reference it, with validation against the engine schema.

Instructions

Store a curve, index or market block under a name for later calls.

Args: name: free-form handle, e.g. sofr. kind: curve (an engine TermStructure or a build_curve result, whose indices are kept alongside), index (an IndexDef) or market ({curves: [...], indices: [...]}). value: the object; it is validated against the engine schema. market_data_source: where the numbers in value 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. A build_curve result already carries its declaration; the two must agree.

In-memory only, per server process, least-recently-used eviction at QUANTRA_SESSION_MAX_ITEMS (default 64). Reference it later as {"session": "<name>"} in bootstrap_curve (and pricing tools); the stored market_data_source is reported in their notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYes
nameYes
valueYes
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.7/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 burden and does so well: it discloses in-memory per-process storage, LRU eviction at QUANTRA_SESSION_MAX_ITEMS (default 64), validation of value against the engine schema, and the provenance semantics required of market_data_source. It also explains how the stored object is referenced later.

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?

Front-loads the one-line purpose before the Args block, and the closing paragraph on eviction/referencing is genuinely useful. Some of the kind and market_data_source prose is dense, but no sentence is 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 four-parameter mutation with an output schema available, the description covers storage lifetime, capacity limits, validation behavior, provenance requirements, and the retrieval path. Nothing an agent needs to call it correctly is missing.

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%, so the description must compensate, and it does: every one of the four parameters is documented with meaning and examples, including the enum values for kind and the full taxonomy for market_data_source. It adds far more than the bare schema provides.

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 (store) and resource (curve, index or market block) plus the mechanism (under a name for later calls), which cleanly separates it from session_get/list/delete. An agent can tell immediately that this is the write side of a session key-value store.

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?

Provides a clear when-to-use ('for later calls') and an explicit when-not ('If you would have to invent numbers, do not call this tool: ask the user'). It also enumerates the market_data_source situations as a decision guide. It stops short of naming alternative tools for the same data (e.g. passing values inline to bootstrap_curve), so not a full 5.

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