Skip to main content
Glama

Compute forecast

compute-forecast
DestructiveIdempotent

Walks a forecast block's driver cascade month-by-month forward from its anchor (with base_anchor='seam', the default, the newest closed month inside the horizon; with 'fixed', the block's base_period): lever-driven rs-driver Derive rules in dependency order, carry-forward for unmodeled income-statement lines, calc-DAG subtotals — upserting per forward month a scenario income-statement FactSet, a balance-sheet set (the full roll when the anchor month has an actual balance sheet, else only the rule-driven working-capital instants) and a derived cash-flow set when an actual one exists, all keyed by the block's scenario_id (NULL = actuals; scenario reads pass it as a filter). Re-running replaces each month's values. Rules with missing lever months or unbound operands are skipped with a reason (their targets fall back to carry-forward). Each month's sets are verified; a month that fails halts the walk there (halted_at), since every later month would be derived from it. Deterministic and non-AI — no credits consumed.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "structure_id": "struct_fy26_budget"
    },
    "name": "compute-forecast"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthsNoForward months to compute — defaults to the block's full horizon_months; must not exceed it (lever assertions don't extend past the horizon).
entity_idNoEntity to compute for. Defaults to the lever FactSet's entity (the entity the scenario was authored against).
structure_idYesForecast block structure (block_type='forecast') to compute.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already flag a destructive, idempotent, non-open-world write; the description corroborates this ('Re-running replaces each month's values') and goes well beyond it. It discloses verification-per-month with halting via halted_at, skipped rules with reasons and carry-forward fallback, conditional creation of the full balance-sheet roll vs working-capital instants, and that no credits are consumed. This is unusually rich behavioral context for a mutation tool.

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 leading clause front-loads the action, and virtually every clause contributes information about behavior the agent could not get elsewhere. The cost is density: it is essentially one long em-dash-chained sentence that is hard to scan, which keeps it from a 5.

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 no output schema, the description must carry the burden of what comes back, and it does so partially by naming halted_at and describing the per-month FactSets produced. For a destructive, non-AI mutation tool this is close to complete, though the agent is not told the full response shape or how skipped-rule reasons are surfaced.

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 coverage is 100%, and each parameter already has its own description including the months-vs-horizon constraint and entity_id defaulting to the lever FactSet's entity. The description adds only marginal meaning, mainly surrounding anchor selection (seam vs fixed) and the scenario_id NULL-equals-actuals convention, neither of which is a parameter here. Baseline 3 applies since the schema carries the parameter burden.

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 states a concrete verb and resource: walking a forecast block's driver cascade month-by-month and upserting IS/BS/CF FactSets keyed by scenario_id. An agent knows exactly what operation this performs. What it does not do is explicitly separate itself from compute-metrics or accept-suggestions beyond a passing reference to 'compute-metrics drift semantics', so it falls short of a 5.

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 context is implied rather than stated: this is the step that materializes a scenario forecast, and re-running is safe because values are replaced. There is no explicit 'use this instead of X when…' routing to compute-metrics or accept-suggestions, and no stated preconditions such as the block needing to be a forecast block with lever assertions in place. Defaults for the anchor are explained, but only as mechanism, not as decision guidance.

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.