Skip to main content
Glama
sablier-ai

Sablier MCP Server

Official
by sablier-ai

compute_returns

Read-only

Stress-test a linear factor model by applying fractional shocks to factors and compute portfolio returns. Specify shocks as fractional changes; the server handles absolute levels automatically.

Instructions

Run a what-if stress test on a Moment (linear) factor model — the PRIMARY tool for scenario analysis. Requires simulation_batch_id from analyze_quantitative or compute_betas. Express stresses as FRACTIONAL CHANGES of each factor's current value (shocks dict). The server translates to absolute levels using each factor's latest observed value — you don't need to look it up or do the arithmetic. Examples: • 'TLT down 8.5%' → {'TLT': -0.085}. • '50bps rate cut on DGS10 (currently 5%)' → {'DGS10': -0.10} (−50bps / 500bps of the current rate = −10%). • 'VIX doubles (to ~40 from 20)' → {'VIX': 1.00}. • 'SPY drops 20%' → {'SPY': -0.20}. Omitted factors default to no shock. Include factor_last_values_raw from the betas output in your narration so the user sees the current level next to the stressed level. Also check data_freshness_warning in betas output — if present, betas may be stale. For Flow (generative) models, use simulate_flow_scenario instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shocksYesFractional change per factor. -0.10 = −10%, 0.25 = +25%. Uniform convention for all feature types (prices, rates, indices, volatilities). For a 50bps rate cut on a rate currently at 5%: −50bps / 500bps = -0.10. For TLT down 8.5%: -0.085. Keys must match conditioning_features.
n_samplesNoNumber of Monte Carlo samples (default 1000)
simulation_batch_idYesFrom analyze_quantitative or compute_betas results

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description does not contradict this. It adds behavioral context beyond annotations by explaining that the server translates fractional changes to absolute levels automatically, that omitted factors default to no shock, and that users should include factor_last_values_raw in narration. These details are not evident from annotations alone, making the tool's execution behavior more predictable.

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?

The description is lengthy but every sentence contributes value: it covers purpose, prerequisites, examples, alternative tools, and output handling. The structure is clear with examples in bullet-like lines. A slight trim of the parenthetical phrase in the second example could improve conciseness, but overall it is appropriate for the tool's complexity.

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?

Given the tool's complexity (3 params, nested objects, high schema coverage) and the presence of an output schema, the description covers all necessary context: how to obtain required inputs, how to format shocks, what to do with outputs (include factor_last_values_raw, check freshness warning), and when to use alternatives. It is self-sufficient for correct invocation.

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?

Although schema coverage is 100%, the description enriches parameter understanding significantly: it explains the fractional change convention with multiple concrete examples (e.g., 'TLT down 8.5%' → {'TLT': -0.085}), clarifies that the server handles conversion to absolute levels, and notes that omitted factors default to no shock. This goes far beyond the schema's raw descriptions.

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?

The description clearly states the tool's purpose: 'Run a what-if stress test on a Moment (linear) factor model.' It also identifies it as the 'PRIMARY tool for scenario analysis,' distinguishing it from siblings like simulate_flow_scenario, which is explicitly named as an alternative for Flow models.

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

Usage Guidelines5/5

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

The description provides explicit usage context: requires simulation_batch_id from analyze_quantitative or compute_betas, explains the shocks format, and gives a direct alternative ('For Flow (generative) models, use simulate_flow_scenario instead'). It also tells the agent to check data_freshness_warning, which is a clear guideline for handling potential stale inputs.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sablier-ai/sablier-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server