Skip to main content
Glama

Stored portfolios

portfolio
Destructive

Manage stored position sets: list, retrieve, save, delete, validate holdings against a scenario, flag unsupported positions and driver impacts, and value exposure at the scenario calculation month.

Instructions

Stored portfolios. Actions: list, get, save, delete, check, exposure.

save checks the contract and writes portfolios/<id>.json; check names every position the scenario's macro and satellite versions cannot serve, with the reason of a driver the out-of-sample check rejected, and warns what an impact on a macro variable reaches through the positions' drivers, with the long-run loading of each one (below 0.1 it barely reacts); exposure values the positions at the calculation month of the scenario's macro version.

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": {
      "action": "<action>"
    },
    "name": "portfolio"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe portfolio id, which is also the name of its file.
specNoThe portfolio specification save checks against the contract before it writes the file.
actionYesWhat to do: list, get, save, delete, check against a scenario, or value the exposure. save overwrites a portfolio stored under the same id; delete removes the portfolio's file.
scenarioNoThe scenario whose macro and satellite versions check and exposure work with.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.2
    • addedInput schema / properties / action / description
      Added value: +"What to do: list, get, save, delete, check against a scenario, or value the exposure. save overwrites a portfolio stored under the same id; delete removes the portfolio's file."
    • addedInput schema / properties / id / description
      Added value: +"The portfolio id, which is also the name of its file."
    • addedInput schema / properties / scenario / description
      Added value: +"The scenario whose macro and satellite versions check and exposure work with."
    • addedInput schema / properties / spec / description
      Added value: +"The portfolio specification save checks against the contract before it writes the file."
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the safety profile is covered structurally. The description adds some genuine context beyond that: save writes to portfolios/<id>.json, check reports unservable positions with rejection reasons, exposure values positions at the scenario's calculation month. It does not add auth, failure, or ordering behavior, so this is incremental rather than rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the action list, which is good, but the middle sentence describing 'check' is a dense run-on stack of clauses ('...with the reason of a driver the out-of-sample check rejected, and warns what an impact on a macro variable reaches through the positions' drivers...') that is hard to parse on one read. The content largely earns its place, but the structure does not.

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?

With an output schema present, return formats need not be described, and the description covers the non-obvious actions (save, check, exposure) reasonably well. Gaps remain for 'list' and 'get', and for the fact that id is nullable in the schema yet clearly mandatory for get and delete, which the description never states.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents id, spec, action, and scenario, including the save-overwrites and delete-removes-file semantics. The description's only real addition is clarifying that 'scenario' supplies the macro and satellite versions used by check and exposure, which the schema already broadly states. Baseline 3 is appropriate.

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 the resource (stored portfolios) and enumerates the six concrete actions (list, get, save, delete, check, exposure), so an agent knows this is a multi-action portfolio CRUD/analysis tool. It never distinguishes itself from siblings like 'scenario', 'run', or 'model', which also participate in scenario-driven analysis, so the boundary is left implicit.

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?

Usage is implied by the action verbs, and 'check' and 'exposure' are tied to a scenario version, which hints at when they apply. There is no explicit when-to-use/when-not guidance, no statement that 'get' and 'delete' require an id, and no routing to or away from sibling tools such as 'scenario' or 'run'.

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