cashflow-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cashflow-mcp-serverWhat's the IRR and payback on a $2M project with $50k monthly profit?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cashflow-mcp-server
An MCP server that lets an agent evaluate a real financing decision: IRR, NPV, payback, working capital, break-even and sensitivity analysis, exposed as tools.
Built on cashflow-engine, a deterministic project cash flow engine. Every tool is a pure computation. No network, no filesystem, no clock, no state between calls.
Why an MCP server for this
Language models are unreliable at multi-step financial arithmetic and very good at the part around it: eliciting terms from a conversation, naming what is being assumed, and explaining what a number means. Splitting those responsibilities is the point.
The model gathers the deal. The engine does the arithmetic. The model reads the result back.
That split also makes the output auditable, which matters more here than in most
domains. The same model always produces the same schedule, the schedule is
returned alongside the metrics, and every tool is annotated readOnlyHint and
idempotentHint, so any call can be repeated and checked.
Related MCP server: ScenarioSim MCP
Install
npm install
npm run buildThen register it with your MCP client. For Claude Code:
claude mcp add cashflow -- node /absolute/path/to/cashflow-mcp-server/dist/index.jsOr add it to a client config directly:
{
"mcpServers": {
"cashflow": {
"command": "node",
"args": ["/absolute/path/to/cashflow-mcp-server/dist/index.js"]
}
}
}Inspect it interactively with npm run inspector.
Tools
Tool | What it answers |
| "How do I shape a contract?" Returns a filled-in, valid model to edit |
| "Is this deal worth doing?" Full schedule and metrics |
| "What breaks it?" Scenarios against the base case |
| "Which of these variants wins?" Two to five, ranked |
| "How many units a month do we need?" |
| "What is the IRR of this vector?" Works on raw flows |
| "What is the payment, and what does the interest cost?" |
| "Is 1% a month the same as 12% a year?" It is not |
A worked exchange
User: We would install 3.5 million of equipment at a hospital, run it for five years, and bill a monthly fee plus per-cycle charges. Is that worth doing?
The agent calls cashflow_model_template to get a shape, fills in the terms from
the conversation, calls cashflow_evaluate_contract, and gets back an 81% IRR
with payback at month 20 and one warning: net working capital exceeds three
months of EBITDA.
User: What if they only send us 80% of the volume they promised?
cashflow_run_sensitivity returns the IRR falling by 46 percentage points and
payback sliding from month 20 to month 37. That is the answer the deal actually
turns on, and it took one more call.
Design decisions worth defending
Absent values are never sentinel numbers. A contract with no outflow has no
IRR. irrAnnual comes back null with irrUnavailableReason set, and the
markdown says "not reportable". Returning -1 or 0 invites an agent to format
it as a percentage and put it in front of a customer. Same for payback: null
means "not within the term", not month zero.
Ranking puts missing values last. In cashflow_compare_contracts, a variant
with no IRR sorts to the bottom rather than to the top. No IRR is not a low IRR,
and "never paid back" is not a fast payback.
Schedules are summarized by default. A 60-month contract is 61 rows of eleven
fields. schedule_detail defaults to annual, which is almost always what the
question needs, and monthly is there when a specific month is in dispute.
Schemas are strict. An unrecognized field is rejected rather than dropped. An
agent that invents taxRate or currency should be told the engine does not
model it, not have it silently ignored and the result reported as authoritative.
Both rate conventions are exposed, and named apart. Discounting compounds.
Amortization divides. cashflow_convert_rate returns both side by side every
time, because the failure mode is not getting the arithmetic wrong, it is not
noticing there were two conventions.
Every tool is openWorldHint: false. These are functions, not integrations.
The annotation says so, and the test suite asserts it.
Testing
npm testTwenty tests drive the real server through a real MCP client over an in-memory
transport. Nothing is stubbed, so a broken input schema, a mismatched
outputSchema or a renamed tool fails in the suite rather than in a host.
Expected values are derived by hand or from known references: the textbook 30-year mortgage payment, a break-even case solvable on paper, a payback that falls on a month you can count to.
Evaluations
evaluations/evaluation.xml holds ten questions that require several tool calls
each, with verified answers. Because the engine is deterministic and the
templates ship with the server, the answers do not drift.
Scope
This server computes cash flows. It does not convert currencies, apply tax, read files, or recommend a decision. It has no opinion about your industry's numbers: every rate, price and cost is an input.
It is also not investment advice. It is arithmetic you can check.
License
MIT
Available Tools
8 toolscashflow_analyze_flowsAnalyze a raw cash flow vectorARead-onlyIdempotent
Compute NPV, IRR and payback directly on a list of period cash flows, with no contract model involved.
Use this when the numbers already exist, for example flows lifted from a spreadsheet, a schedule produced elsewhere, or a quick sanity check.
The first element sits at period 0 and is not discounted. Outflows are negative.
Args:
flows (array of numbers): Cash flow per period, flows[0] at t=0. Needs at least 2 entries.
period ('monthly' | 'annual'): What one element represents. Default 'monthly'. Determines how the rate is annualized.
discount_rate_annual (number): Effective annual rate for NPV, e.g. 0.14 for 14%. Default 0.
interpolate_payback (boolean): Return a fractional payback period instead of whole periods. Default false.
Returns: npv, irrAnnual, irrPeriodic, irrAvailable, irrUnavailableReason, payback and cumulative totals.
irrAnnual is null when the vector has no reportable IRR: no outflow, no inflow, or flows that never sum positive. The reason says which.
A vector whose sign changes more than once may have several real IRRs. The engine returns one and flags nothing, which is a property of IRR itself. signChanges is reported so you can tell when to trust NPV instead.
Examples:
Use when: "What is the IRR of -1000, 500, 500, 500?"
Use when: "Discount these annual flows at 12% and tell me the NPV."
Don't use when: you have contract terms rather than flows (use cashflow_evaluate_contract)
| Name | Required | Description | Default |
|---|---|---|---|
| flows | Yes | Cash flow per period. flows[0] is period 0 and is not discounted. | |
| period | No | What one element represents. | monthly |
| interpolate_payback | No | Return a fractional payback period instead of whole periods. | |
| discount_rate_annual | No | Effective annual discount rate, e.g. 0.14 for 14%. |
Output Schema
| Name | Required | Description |
|---|---|---|
| npv | Yes | |
| payback | Yes | |
| netTotal | Yes | |
| irrAnnual | Yes | |
| irrPeriodic | Yes | |
| signChanges | Yes | |
| irrAvailable | Yes | |
| totalInflows | Yes | |
| totalOutflows | Yes | |
| discountRatePeriodic | Yes | |
| irrUnavailableReason | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Although annotations already mark the operation as read-only and idempotent, the description adds substantial behavioral detail: flows[0] is not discounted, outflows are negative, IRR can be unavailable with specific reasons, and multiple sign changes may produce multiple IRRs. This goes well beyond the annotations and helps the agent interpret results correctly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized and front-loaded with the core purpose, followed by usage guidance, parameter clarifications, return behavior, and examples. Every block earns its place; there is no fluff, and the examples compactly convey common use cases.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a financial-analysis tool with edge cases, the description covers the essential caveats: non-discounted period 0, IRR unavailability conditions, multiple IRR ambiguity, and signChanges as a trust signal. Since an output schema exists, detailed return values are not required here, but the description still provides the most important return semantics.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3, but the description adds meaningful semantics beyond the schema: period determines annualization behavior, the first element is not discounted, outflows must be negative, and discount_rate_annual uses effective annual rate with an example. It also clarifies the minimum length requirement for flows.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: 'Compute NPV, IRR and payback directly on a list of period cash flows'. It clearly distinguishes itself from contract-based siblings by stating 'with no contract model involved', and the later contrast with cashflow_evaluate_contract removes ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use the tool ('when the numbers already exist', spreadsheet flows, sanity check), gives concrete example queries, and provides a direct exclusion: 'Don't use when: you have contract terms rather than flows (use cashflow_evaluate_contract)'. This is exemplary routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cashflow_breakevenBreak-even volumeARead-onlyIdempotent
Compute the monthly volume at which a contract stops losing money, without running the full schedule.
Contingency is folded into the contribution margin rather than added to fixed cost, because total cost is (fixed + maintenance + variable x u/u0) x (1 + contingency): contingency multiplies both sides. Fixed revenue offsets fixed cost, so a contract whose flat fee already covers its fixed base breaks even at zero units.
Escalation is excluded on purpose. Break-even is a statement about the base year.
Args:
model (object): The contract, same shape as cashflow_evaluate_contract.
volume_factor (number): Scales planned volume before solving. Default 1.
Returns: units, revenue, marginOfSafetyPct, averagePrice, variableCostPerUnit and contributionPerUnit. Returns null when the model has no metered streams to break even on, and unitsUnreachable true when contribution per unit is zero or negative.
Examples:
Use when: "How many units a month do we need to cover costs?"
Use when: "How much headroom is there between plan and break-even?"
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| volume_factor | No | Scales planned volume before solving. |
Output Schema
| Name | Required | Description |
|---|---|---|
| breakeven | Yes | |
| hasMeteredVolume | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark this readOnly and idempotent, and the description adds substantial behavioral detail: how contingency is folded into contribution margin, the exclusion of escalation, handling of fixed revenue offset, and edge cases returning null or unitsUnreachable. This goes well beyond what annotations provide and fully discloses the computation's assumptions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but well-structured: a one-line summary, then logic, args, returns, and examples. It front-loads the purpose and uses sections effectively. Some sentences about contingency could be considered verbose, but they are essential to prevent misuse, so a 4 is fair.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of the model, the description covers assumptions, edge cases (null, unitsUnreachable), return fields, and usage scenarios. It is complete enough for an agent to invoke correctly, and the output schema (though not shown) is further supported by the listed return fields.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema describes volume_factor ('Scales planned volume before solving'), and the description adds a default of 1 and clarifies that model has the same shape as cashflow_evaluate_contract. This adds some context, but with only 50% schema coverage the description does not fully compensate for the lack of documentation on the nested model fields, which are already described in the schema itself. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Compute the monthly volume at which a contract stops losing money, without running the full schedule.' It clearly distinguishes from the sibling cashflow_evaluate_contract by noting it avoids the full schedule, and it explains the core purpose unambiguously.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit 'Use when' examples ('How many units a month do we need to cover costs?', 'How much headroom is there between plan and break-even?'). It also contrasts with the full schedule, implying the alternative is cashflow_evaluate_contract, but it does not explicitly name that tool or state when not to use this one, so a 4 rather than 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cashflow_compare_contractsCompare contract variantsARead-onlyIdempotent
Evaluate two to five named contract variants and rank them side by side.
Built for the question these models exist to answer: pay cash or finance, 24 months interest-free or 36 with interest, higher fixed fee or higher per-unit price, 3-year term or 5-year.
Args:
variants (array): 2 to 5 entries of { name, model }.
rank_by ('npv' | 'irr' | 'payback'): Which metric orders the result. Default 'npv'.
response_format ('markdown' | 'json'): Default 'markdown'.
Returns: variants[] ordered best first by the chosen metric, each with its headline metrics and financing cost, plus the name of the winner.
Ranking by IRR places variants without a reportable IRR last, because an absent IRR is not a low one.
Examples:
Use when: "Should we take the 24-month interest-free plan or pay cash?"
Use when: "Compare a 3-year and a 5-year term on the same contract."
| Name | Required | Description | Default |
|---|---|---|---|
| rank_by | No | Metric that orders the result. | npv |
| variants | Yes | The variants to compare. | |
| response_format | No | 'markdown' for a readable report, 'json' for the full structured result. Structured data is returned either way in structuredContent. | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| winner | Yes | |
| rankedBy | Yes | |
| variants | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so safety behavior is covered. The description adds valuable behavioral details: variants are ordered best-first by the chosen metric, each entry includes headline metrics and financing cost, a winner is named, and IRR-less variants are ranked last because an absent IRR is not a low one. This goes well beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well structured with clear sections: purpose, args, returns, ranking nuance, and examples. It front-loads the core purpose and uses the examples efficiently. The phrase 'Built for the question these models exist to answer' is slightly unnecessary but not harmful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with nested model objects and an output schema, this description is sufficiently complete. It covers input constraints (2–5 variants), ranking metric defaults, response formats, output shape, ranking behavior, and practical examples. The schema and output schema handle the remaining parameter and return-structure details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description restates the shape of variants and the defaults for rank_by and response_format, but it does not add meaningful semantic depth beyond what the input schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Evaluate two to five named contract variants and rank them side by side.' It clearly differentiates this from sibling tools like cashflow_evaluate_contract by framing it specifically as a multi-variant comparison, and the examples reinforce the intended use cases.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit 'Use when' examples, such as comparing 24-month interest-free versus 36-month with interest, and comparing 3-year versus 5-year terms. It does not name sibling tools or state when not to use this tool, but the context is clear enough for an agent to select it for comparison questions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cashflow_convert_rateConvert between rate conventionsARead-onlyIdempotent
Convert an annual rate to a monthly one and back, under either convention.
'compound' is the discounting convention: (1 + annual)^(1/12) - 1. 'divide' is the loan convention: annual / 12. A 12% annual rate is 0.9489% per month compounded but 1% per month divided, and using one where the other belongs quietly distorts every downstream number.
Args:
value (number): The rate to convert, e.g. 0.14 for 14%.
direction ('annual_to_monthly' | 'monthly_to_annual'): Which way to convert.
convention ('compound' | 'divide'): 'compound' for discounting, 'divide' for amortization.
Returns: input, output, and both conventions side by side so the difference is visible.
Examples:
Use when: "What monthly rate should I discount at for a 14% cost of capital?"
Use when: "Is 1% a month the same as 12% a year?"
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The rate to convert. | |
| direction | No | Which way to convert. | annual_to_monthly |
| convention | No | 'compound' for discounting, 'divide' for amortization. | compound |
Output Schema
| Name | Required | Description |
|---|---|---|
| input | Yes | |
| output | Yes | |
| divided | Yes | |
| direction | Yes | |
| compounded | Yes | |
| convention | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, establishing the tool's safety profile. The description adds valuable behavioral context by explaining the formulas for each convention, warning that mixing conventions 'quietly distorts every downstream number,' and noting the return format includes both conventions side-by-side. This goes beyond the annotations and enriches the agent's understanding.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and appropriately sized. It starts with the core purpose, then explains the conventions, lists arguments, describes the return, and ends with usage examples. Every sentence adds value—the warning about distortion and the concrete examples are essential, not filler. It is concise yet comprehensive.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the richness of the schema (100% coverage) and output schema, the description is complete. It covers all parameters, explains the math, provides usage examples, and highlights the critical pitfall. The agent has everything needed to correctly select and invoke the tool without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and each parameter has a description, so the baseline is 3. However, the description adds significant meaning: it provides the exact mathematical formula for the 'convention' parameter ('(1 + annual)^(1/12) - 1' vs 'annual / 12') and gives a concrete example for 'value' ('0.14 for 14%'). This goes well beyond the schema's generic wording, making the semantics much clearer.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool converts between annual and monthly rates under two conventions, using specific verbs and resources. It distinguishes itself from sibling tools (analysis, modeling, evaluation, etc.) by focusing solely on rate conversion, so an agent can easily identify its unique purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly provides two 'Use when' examples that illustrate concrete scenarios, guiding the agent on when to invoke this tool. While it doesn't list alternatives, the clear examples and distinct focus make the intended usage unambiguous relative to the sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cashflow_evaluate_contractEvaluate a contractARead-onlyIdempotent
Expand a contract into a month-by-month cash flow schedule and compute the metrics that follow from it: IRR, NPV, simple and discounted payback, MOIC, ROI, working capital, break-even volume, and the financing cost of any asset paid in installments.
Use this as the main entry point whenever someone asks whether a deal, contract, lease, managed-service agreement or equipment purchase is worth doing.
Args:
model (object): The contract. Call cashflow_model_template first if you are unsure how to shape it.
schedule_detail ('none' | 'annual' | 'monthly'): How much of the schedule to return. Default 'annual'. Ask for 'monthly' only when a specific month matters; a 60-month contract returns 61 rows.
response_format ('markdown' | 'json'): Default 'markdown'.
Returns: metrics (IRR, NPV, payback, MOIC, ROI, EBITDA), financing, workingCapital, breakeven, annual rollup, optional schedule, and warnings.
irrAnnual is null when the flows have no reportable IRR, with the reason in irrUnavailableReason. Treat null as "no IRR exists", never as zero. paybackMonth is null when the investment is never recovered within the term.
Examples:
Use when: "Is this 5-year service contract worth signing?"
Use when: "What is the IRR and payback on this equipment deal?"
Don't use when: comparing two or more variants (use cashflow_compare_contracts)
Don't use when: stress-testing assumptions (use cashflow_run_sensitivity)
Error handling: Returns a validation error naming the offending field if the model is malformed.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| response_format | No | 'markdown' for a readable report, 'json' for the full structured result. Structured data is returned either way in structuredContent. | markdown |
| schedule_detail | No | How much of the cash flow schedule to include. 'annual' rolls it up by contract year and is almost always enough. 'monthly' can be hundreds of rows, so ask for it only when a specific month is in question. | annual |
Output Schema
| Name | Required | Description |
|---|---|---|
| annual | Yes | |
| metrics | Yes | |
| schedule | No | |
| warnings | Yes | |
| breakeven | Yes | |
| financing | Yes | |
| scheduleDetail | Yes | |
| workingCapital | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, so the description doesn't restate safety. It adds valuable behavioral nuance beyond annotations: null semantics for irrAnnual (with irrUnavailableReason) and paybackMonth, and error handling that names the offending field on malformed input. This transparency helps agents interpret results correctly and handle failures gracefully.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is longer than a single sentence but well-structured with sections for purpose, args, examples, and error handling. Each section earns its place, and the core scoping statement is front-loaded. The length is justified by the tool's complexity, and there's no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (nested model object, many fields), the description provides enough to call it correctly: it points to cashflow_model_template for shaping the model, explains null returns, and describes error handling. The output schema is present, so return details are covered elsewhere. It's comprehensive without being exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 67%, so the description must add meaning beyond the schema. It does: for schedule_detail it warns that 'monthly' can return 61 rows for a 60-month contract and should only be requested when a specific month matters; for response_format it clarifies that structured data is always returned in structuredContent. It also advises calling cashflow_model_template when unsure how to shape the model. These add practical guidance over the schema's bare descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Expand a contract into a month-by-month cash flow schedule and compute the metrics that follow from it,' naming IRR, NPV, payback, MOIC, ROI, working capital, break-even, and financing cost. It then declares itself the 'main entry point' for evaluating deals, which clearly distinguishes it from siblings like cashflow_compare_contracts and cashflow_run_sensitivity. The purpose is unambiguous and differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit use cases ('Use when: Is this 5-year service contract worth signing?') and explicit non-use cases with alternatives ('Don't use when: comparing two or more variants (use cashflow_compare_contracts)'). This is exactly the when/when-not guidance agents need, with sibling tools named. Nothing is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cashflow_loan_termsInstallment plan termsARead-onlyIdempotent
Compute the level monthly payment that amortizes a principal, plus the total paid and the interest it costs.
Matches the spreadsheet PMT(rate/12, nper, -pv) convention, including the zero-rate case, so the output can be checked against Excel cell by cell.
Note the rate convention: loans divide the annual rate by 12, they do not compound it. This tool divides. Discounting elsewhere in this server compounds. Mixing the two is the most common error in a hand-built model.
Args:
principal (number): Amount financed.
term_months (integer): Number of level payments. 0 means paid in cash.
annual_rate (number): Nominal annual rate, e.g. 0.12 for 12% APR. Use 0 for an interest-free plan.
include_amortization (boolean): Return the per-month interest and principal split. Default false.
Returns: monthlyPayment, totalPaid, interestPaid, and optionally an amortization schedule of { month, payment, interest, principal, balance }.
Examples:
Use when: "What is the payment on 3.5 million over 36 months at 12%?"
Use when: "How much interest does the 36-month plan cost versus 24 months interest-free?"
| Name | Required | Description | Default |
|---|---|---|---|
| principal | Yes | Amount financed. | |
| annual_rate | No | Nominal annual rate, divided by 12 per month. 0 is interest-free. | |
| term_months | Yes | Number of level payments. 0 means paid in cash. | |
| include_amortization | No | Return the per-month interest and principal split. |
Output Schema
| Name | Required | Description |
|---|---|---|
| totalPaid | Yes | |
| monthlyRate | Yes | |
| amortization | No | |
| interestPaid | Yes | |
| monthlyPayment | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the tool read-only and idempotent. The description adds valuable behavioral detail beyond that: it matches spreadsheet PMT(rate/12, nper, -pv), handles the zero-rate case, and divides the annual rate by 12 rather than compounding it. This is exactly the kind of context that prevents incorrect invocation or misinterpretation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, then the critical rate convention, then arguments, return values, and examples. Every sentence adds value: the PMT convention, the rate warning, and the examples are all substantive and non-redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists and annotations cover safety, the description is complete: it explains what the tool computes, the important rate convention, the optional amortization output, and provides realistic usage examples. Nothing an agent needs to call this correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the Args section mostly restates the schema descriptions (principal, term_months, annual_rate, include_amortization). The global rate-convention warning is useful but not parameter-specific, so the description adds little meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Purpose is stated with a specific verb and resource: 'Compute the level monthly payment that amortizes a principal, plus the total paid and the interest it costs.' The reference to spreadsheet PMT and the rate-convention warning clearly distinguish it from sibling cash-flow tools that analyze flows, run sensitivity, or convert rates.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives concrete 'Use when' examples and explicitly warns against mixing the loan rate division convention with compounding discounting used elsewhere in the server. This gives clear context for when the tool is appropriate, though it does not name sibling alternatives or provide an explicit when-not-to-use list.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cashflow_model_templateGet a contract templateARead-onlyIdempotent
Return a filled-in, valid contract model to copy and edit.
Call this first when you are about to build a model and are unsure how the fields fit together. Editing a working example is faster and safer than assembling one from the schema, and the returned object is guaranteed to validate.
Three shapes are available:
'managed_service': exercises every field, including metered streams, staged investments, a financed asset with interest, maintenance and working capital.
'subscription': flat fee, no metered volume, no financed asset.
'equipment_lease': fully metered revenue, interest-free installments, residual value.
Args:
template ('managed_service' | 'subscription' | 'equipment_lease'): Which shape. Default 'managed_service'.
Returns: model (the object to pass to the other tools), notes (what the shape is for), and conventions (the rules that govern every model).
Examples:
Use when: "Help me model a service contract" and no model exists yet.
Use when: you need to check what a field is called or how it is shaped.
| Name | Required | Description | Default |
|---|---|---|---|
| template | No | Which shape to return. | managed_service |
Output Schema
| Name | Required | Description |
|---|---|---|
| model | No | |
| notes | Yes | |
| template | Yes | |
| conventions | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, and the description adds valuable behavioral context: the returned object is 'guaranteed to validate,' includes model/notes/conventions, and each template shape's coverage is described. No contradiction exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a lead sentence, a 'when to use' rationale, bulleted shape explanations, args/returns sections, and examples. Every sentence adds useful information, and the most important guidance is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter, high-level template tool with an output schema, the description is complete: it covers purpose, expected return shape, template options, defaults, and usage context. Nothing an agent needs to know before calling it is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the schema already documents the single template parameter at 100% coverage, the description enriches each enum value with meaning: 'managed_service' exercises every field, 'subscription' has flat fee/no metered volume, 'equipment_lease' has fully metered revenue. It also clearly states the default.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Return a filled-in, valid contract model to copy and edit.' It then distinguishes itself from sibling analysis/evaluation tools by positioning itself as the first step when building a model, not analyzing one.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit usage guidance is provided: 'Call this first when you are about to build a model and are unsure how the fields fit together.' It also gives concrete examples ('Help me model a service contract' and no model exists yet) and compares to assembling from schema, making when-to-use vs alternatives clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cashflow_run_sensitivityStress-test a contractARead-onlyIdempotent
Re-evaluate a contract under a set of scenarios and report each one against the base case.
Five scenarios run by default: volume -20%, volume -10%, volume +20%, no price indexation, and operating cost +10%. Pass your own scenarios to override them.
Volume is listed first on purpose: a volume forecast taken from a customer's own estimate is a negotiating position, not a measurement, and it is the assumption that breaks most often.
Args:
model (object): The contract, same shape as cashflow_evaluate_contract.
scenarios (array, optional): Custom scenarios. Each has id, label, and any of volumeFactor, priceFactor, costFactor, revenueEscalation, costEscalation.
response_format ('markdown' | 'json'): Default 'markdown'.
Returns: base (the unmodified case) and scenarios[], each with irrAnnual, npv, paybackMonth, irrDeltaPoints (percentage points against base, null when either side has no IRR) and npvDelta.
Examples:
Use when: "What happens to this deal if volume comes in 20% under plan?"
Use when: "How fragile is the return to the inflation clause?"
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| scenarios | No | Custom scenarios. Omit to use the five defaults. | |
| response_format | No | 'markdown' for a readable report, 'json' for the full structured result. Structured data is returned either way in structuredContent. | markdown |
Output Schema
| Name | Required | Description |
|---|---|---|
| base | Yes | |
| scenarios | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already establish readOnlyHint, idempotentHint, and non-destructive behavior. The description adds valuable behavioral detail: the five default scenarios, the fact that custom scenarios override them, the emphasis on volume as the most fragile assumption, and the return semantics (base case unmodified, deltas in percentage points, null IRR handling). No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized with Args, Returns, and Examples sections, front-loading the purpose and default behavior. The extended note about volume is somewhat digressive but still adds useful domain context. Overall, every section earns its place with minimal filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complex nested schema and existing output schema, the description is quite complete: it covers default scenarios, override behavior, return fields, and example use cases. It stops short of explicitly routing to sibling tools or stating exclusions, which would make it fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 67%, and the description compensates well. It describes the model as 'same shape as cashflow_evaluate_contract', lists scenario fields succinctly, and explains response_format options. This goes beyond the raw schema entries by clarifying the relationship to other tools and the effect of custom scenarios.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Re-evaluate a contract under a set of scenarios and report each one against the base case.' This is a specific verb+resource that distinguishes it from a simple single evaluation, though it does not explicitly name sibling tools to differentiate itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit 'Use when' examples, such as 'What happens to this deal if volume comes in 20% under plan?' and 'How fragile is the return to the inflation clause?'. This gives clear context for when the tool is appropriate, but it does not mention alternatives or when-not-to-use conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v0.1.0- First observed
cashflow_analyze_flows - First observed
cashflow_breakeven - First observed
cashflow_compare_contracts - First observed
cashflow_convert_rate - First observed
cashflow_evaluate_contract - First observed
cashflow_loan_terms - First observed
cashflow_model_template - First observed
cashflow_run_sensitivity
TDQS
Scored across 8 tools
Each tool targets a clearly distinct purpose: raw cash-flow vectors, contract models, sensitivity scenarios, variant comparison, break-even, loan payments, and rate conversion. The closest pair (cashflow_analyze_flows vs cashflow_evaluate_contract) is cleanly separated by explicit use and don't-use guidance. Agent misselection risk is low.
All tools share the cashflow_ prefix, and most follow a verb_noun pattern such as analyze_flows, evaluate_contract, run_sensitivity, and compare_contracts. A few names like model_template, loan_terms, and breakeven are noun-like deviations, but the overall pattern remains recognizable and predictable.
Eight tools is a well-scoped size for a cash-flow modeling server. Each tool earns its place and covers a distinct workflow without redundancy or feature bloat.
The surface covers the full modeling lifecycle: template generation, contract evaluation, raw flow analysis, sensitivity testing, variant comparison, break-even computation, loan amortization, and rate conversion. Common cash-flow questions all have a direct tool with no obvious dead ends.
Maintenance
Related MCP Connectors
Deterministic finance tools for AI agents — IRR, NPV, MOIC, DCF, WACC and sensitivity.
Deterministic company valuation and corporate finance tools for AI agents — IRR, NPV, MOIC, DCF, WACC, enterprise value, EV multiples, CAPM, beta and sensitivity analysis via Model Context Protocol. Useful for financial analysis, equity analysis, quantitative analysis, financial projections, financial formulas and financial modeling.
Deterministic time-value-of-money and fund-performance tools for AI agents — future value, present value, CAGR, annuities, perpetuities, loan payments, payback, discounted payback, DPI, RVPI and TVPI via Model Context Protocol. Useful for corporate finance, financial projections, financial analysis, quantitative analysis, financial formulas and financial modeling.
Deterministic what-if & scenario simulation for AI agents: projections, sensitivity & break-even.
Related MCP Servers
- AlicenseBqualityCmaintenanceProvides 77 deterministic financial calculators, live market data, and a meta-advisor that chains tools into prioritized plans from plain-language descriptions.776MIT
- AlicenseAqualityAmaintenanceA deterministic what-if scenario simulation MCP server that projects business metrics over time with exact decimal arithmetic, offering sensitivity analysis and break-even solving.631 npm1MIT
- FlicenseNot gradedqualityCmaintenanceEnables precise financial analysis of AI agent costs, including token pricing, multi-step run estimates, model comparison, and ROI versus human labor, with deterministic decimal math.-
- FlicenseNot gradedqualityBmaintenanceEnables reverse DCF/FCFF valuations, solving for required margins, growth, or reinvestment to achieve a target enterprise value, with forward DCF, consistency validation, feasibility grids, and automated evals.-