Skip to main content
Glama

Fi-Plan

Run a what-if scenario on a plan

simulate_plan
Read-onlyIdempotent

Applies an ordered list of scenario patches to a DEEP COPY of the plan (never persisted) and returns the resulting snapshot plus applied_patches. Pass plan_id to load the plan server-side (preferred — never paste plan_json); plan_json is accepted for portability. Pass summary=true for the compact view; add milestones=true for long durations to get yearly points + totals instead of every month. Patches support add_income, add_expense, add_cashflow_change, add_loan, update_loan (loan_id plus any of title, principal_amount, interest_rate, start_month, end_month, deposit_to_bank, type, ref_id, prepayments), add_fdp (fdp: { start_month, end_month, s, e, i } with s + e + i = 100 — or the legacy { amount, interest_rate, tenure } fixed-deposit shape) and set_account_balance — nested ({"op":"add_cashflow_change","change":{...}}) and flat ({cashflow_id,value,start_month,...}) forms are both accepted; the op is inferred from the fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchesNoOrdered scenario patches (add_income, add_expense, add_cashflow_change, add_loan, update_loan, add_fdp, set_account_balance).
plan_idNoLoad a saved plan by id (authenticated tier only).
summaryNoReturn the compact summary (monthly totals + balances) instead of the full snapshot.
durationNoProjection length in months (public tier caps this).
plan_jsonNoInline plan object for anonymous use; bounded to 256 KB.
milestonesNoWith summary, return yearly points and totals instead of every month.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / duration / description
      Added value: +"Projection length in months (public tier caps this)."
    • addedInput schema / properties / milestones / description
      Added value: +"With summary, return yearly points and totals instead of every month."
    • addedInput schema / properties / patches / description
      Added value: +"Ordered scenario patches (add_income, add_expense, add_cashflow_change, add_loan, update_loan, add_fdp, set_account_balance)."
    • addedInput schema / properties / plan_id / description
      Added value: +"Load a saved plan by id (authenticated tier only)."
    • addedInput schema / properties / plan_json / description
      Added value: +"Inline plan object for anonymous use; bounded to 256 KB."
    • addedInput schema / properties / summary / description
      Added value: +"Return the compact summary (monthly totals + balances) instead of the full snapshot."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare a safe, idempotent, non-destructive read, and the description adds meaningful context beyond them: the plan is a DEEP COPY that is never persisted, plan_id is an authenticated-tier feature, duration is capped on the public tier, and the response shape varies with summary/milestones. These are real behavioral traits, not restatements of the hints.

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?

It is front-loaded with purpose first, then loading strategy, then output-shaping flags, then the patch catalogue. Dense but nearly every clause carries operational information; the patch enumeration is long though justified given the generic patch schema, and could be slightly tightened.

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 and a generic nested patch object, the description does the necessary work of describing the return value (snapshot vs summary vs yearly milestones) and the patch grammar. Gaps remain around partial-failure/validation behavior and patch ordering side effects, but nothing critical to invoking it correctly is missing.

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?

Schema coverage is 100%, yet the description still adds substantial meaning the schema cannot: it enumerates the supported patch operations, documents update_loan's accepted fields, specifies the add_fdp constraint s + e + i = 100 plus the legacy fixed-deposit shape, and explains that nested and flat patch forms are both accepted with the op inferred from fields.

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 precise verb+resource+mechanism: it applies an ordered list of scenario patches to a deep copy of a plan and returns the resulting snapshot plus applied_patches. This scope is unambiguous and clearly separable from siblings like loan_amortization or loan_refinance, which compute rather than simulate patched scenarios.

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?

It gives conditional parameter guidance (plan_id preferred over plan_json; summary=true for compact output; milestones=true for long durations) but never states when to choose this tool over the sibling projection/amortization tools. Usage is implied by the purpose rather than explicitly contrasted with alternatives.

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.