Skip to main content
Glama

13-Week Cash Flow Forecast

13-Week Cash Flow Forecast — Get Engine Script (large ledgers)

cash_forecast_get_engine
Read-only

For ledgers above the cash_forecast caps (over 5,000 open invoices, 50,000 history rows or 5,000 bills), more simulation paths, or files already in your code sandbox. Returns a complete numpy-only Python script with the same engine as cash_forecast; it reads the CSV / TSV / JSON files named in the call, prints the decision cards and the weekly table, and writes the full result to cash_forecast_result.json and the snapshot to payment_behaviour_snapshot.json. No data reaches this server on this path.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cash_forecast_get_engine"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsNoOther inputs exactly as cash_forecast takes them (opening_balance, minimum_cash, as_of, scenarios, n_paths up to 50,000 ...).
actuals_pathNoactuals file in your sandbox (CSV/TSV/JSON).
ap_open_pathNoap_open file in your sandbox (CSV/TSV/JSON).
ar_open_pathNoar_open file in your sandbox (CSV/TSV/JSON).
payroll_pathNopayroll file in your sandbox (CSV/TSV/JSON).
new_sales_pathNonew_sales file in your sandbox (CSV/TSV/JSON).
recurring_pathNorecurring file in your sandbox (CSV/TSV/JSON).
statutory_pathNostatutory file in your sandbox (CSV/TSV/JSON).
ap_history_pathNoap_history file in your sandbox (CSV/TSV/JSON).
ar_history_pathNoar_history file in your sandbox (CSV/TSV/JSON).
fixed_inflows_pathNofixed_inflows file in your sandbox (CSV/TSV/JSON).
fixed_outflows_pathNofixed_outflows file in your sandbox (CSV/TSV/JSON).
previous_forecast_pathNoprevious_forecast file in your sandbox (CSV/TSV/JSON).
payment_behaviour_snapshot_pathNopayment_behaviour_snapshot file in your sandbox (CSV/TSV/JSON).

Output Schema

NameRequiredDescriptionDefault
notesNo
pathsNo
scriptYes
languageNo
requiresNo
writes_fileNo
instructionsYes
engine_versionYes
scipy_requiredNo
data_requirementsNo
network_access_requiredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations, it discloses the dependency profile (numpy-only, no external libraries), the side effects (prints decision cards and the weekly table, writes cash_forecast_result.json and payment_behaviour_snapshot.json), and the key trust property that no data reaches the server on this path. The sandbox file writes do not contradict readOnlyHint, since the annotation concerns server-side state.

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?

Two sentences, front-loaded with the qualifying condition so an agent can decide eligibility before reading further. The second sentence is dense but every clause (engine parity, file formats, printed output, two written files, no server data) carries information an agent needs.

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?

For a 14-parameter tool with an output schema, the description covers what the script produces and where it writes it, so return-value explanation is not needed. The one real gap is that no parameters are required, and the description never says which input files must be supplied for the script to run successfully.

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

Parameters4/5

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

Schema coverage is 100%, so the per-parameter descriptions already do the work; the description adds cross-tool semantics by saying params are passed exactly as cash_forecast takes them, and calls out the n_paths ceiling of 50,000 and the CSV/TSV/JSON file constraint. It stops short of indicating which of the 14 optional paths are needed for a valid run.

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 states a specific verb and artifact: it returns a complete numpy-only Python script running the same engine as cash_forecast. It explicitly frames the resource as the script-generation path for oversized ledgers, which is directly distinguishable from the sibling cash_forecast that runs the engine server-side.

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?

It gives concrete selection thresholds (over 5,000 open invoices, 50,000 history rows, 5,000 bills), plus two additional triggers: needing more simulation paths and having files already in the code sandbox. The 'when not' case is only implied by reference to the cash_forecast caps rather than stated outright, which keeps this just short of a 5.

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.