Skip to main content
Glama

Custom Solutions

Cash-on-cash return

compute_cash_on_cash
Read-onlyIdempotent

Cash-on-cash return of a rental: yearly cash flow after principal and interest divided by the cash put into the deal, with the payback period in years. The hard part is the denominator: cash invested is the down payment plus closing costs, points, lender fees and repairs paid in cash, and leaving any of them out inflates the return. Send annual_cash_flow (after the mortgage, negative when the property loses money) and cash_invested. A negative cash flow is computed and flagged rather than refused; the payback period is null when cash flow is not positive.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "annual_cash_flow": "<annual_cash_flow>",
      "cash_invested": "<cash_invested>"
    },
    "name": "compute_cash_on_cash"
  }
}

Input Schema

NameRequiredDescriptionDefault
cash_investedYesCash put in: down payment, closing costs, points, repairs paid in cash, e.g. 80000
annual_cash_flowYesCash flow per year after the mortgage, e.g. 6000 (negative when it loses money)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safe-read profile (readOnly, idempotent, non-destructive), and the description goes further by disclosing edge-case behavior: negative cash flow is computed and flagged rather than refused, and payback period is null when cash flow is not positive. It does not say what the flagged output looks like exactly, which keeps it from a 5.

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 formula, then the denominator caveat, then edge-case handling — a logical order with little waste. The middle sentence is dense but every clause is informative.

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 takes on explaining return values and does so for the key cases (payback period in years, null on non-positive cash flow, negative flow flagged). For a two-input, single-metric computation this is close to complete, though the exact response shape is not spelled out.

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%, so both parameters are already documented. The description restates the denominator composition (down payment, closing costs, points, lender fees, repairs) but this largely duplicates the schema's own description; it adds a warning about omission inflating returns rather than new parameter-level semantics.

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 metric, its domain ('of a rental'), and the exact formula (yearly cash flow after principal and interest divided by cash invested, with payback period). This is precise enough to separate it from siblings like compute_cap_rate, compute_irr, or compute_dscr without opening any 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?

Usage context is implied rather than stated: the agent can infer this is for rental cash-on-cash and what to send, but there is no explicit when-to-use vs. alternative (e.g., cap rate or IRR) and no prerequisites beyond the two inputs.

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