Skip to main content
Glama

finance

Analytics: Forecast cash flow

forecast_cash_flow
Read-onlyIdempotent
    Project cash flow for the next N months based on recent patterns.

    Uses 3-month averages of income and expenses as a baseline AND
    biases each future month by recurring templates the user has
    scheduled but that haven't fired yet (Phase 115). Templates that
    have already fired at least once are folded into the historical
    baseline, so they're not counted twice.

    Each projection row carries ``scheduled_income_added`` and
    ``scheduled_expenses_added``, which separate the part of the
    projection that comes from "what's already happening" from
    "what's scheduled to start." The top-level
    ``scheduled_templates_count`` is the number of un-fired templates
    contributing to the bias — when 0, the projection is purely
    historical.

    Args:
        months_ahead: Number of months to project (default 3, max 12).
            Values <= 0 return a validation error; values > 12 are clamped
            to 12 and the response sets clamped_months_ahead=true while
            requested_months_ahead echoes the original input.
        account_id: Optional - project for a specific account only

    Returns:
        Current balance, average monthly income/expenses/net,
        monthly projections (each with the scheduled-bias breakout),
        ``scheduled_templates_count``, and a human-readable note.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idNo
months_aheadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior, so the burden is lower. The description goes beyond them by disclosing the double-counting rule for already-fired templates, the scheduled_income_added/expenses_added breakout, and the clamped_months_ahead / validation-error edge cases — genuinely useful behavior beyond structured fields.

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-loaded with the core purpose, then structured Args/Returns sections. It is verbose — the Phase 115 reference and extended prose on the bias mechanism are heavier than strictly necessary — but each part informs correct invocation of an analytical tool.

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 usefully documents the return shape (balance, averages, projections, scheduled_templates_count, note) and covers both parameters. It is nearly complete for this analytical tool; only corner cases like empty history/no accounts are unaddressed.

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 0%, so the description carries full load. months_ahead is richly specified (default 3, max 12, <=0 error, >12 clamped with a response flag), which compensates well; account_id is thinner ('optional - project for a specific account only') but adequate given the integer type is in the schema.

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 and resource ('Project cash flow for the next N months') and immediately scopes it as forward-looking, which implicitly separates it from the historical sibling get_cash_flow. An agent can tell what this does without opening the schema.

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?

The description explains the forecasting methodology in detail, which implies when the tool is relevant, but it never explicitly states when to pick this over alternatives like get_cash_flow or get_period_summary, nor any exclusions. Usage is left to inference from the purpose.

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.

Resources