Skip to main content
Glama

Save loan

save_loan

Create or update a loan: money the business owes. Pass an id from list_loans to update that loan; omit it to create one, which needs a lender. A new loan gets its own liability account. An id this business does not own is refused with code loan-not-found. An opening date later than entries already on the loan's account is refused, unwritten, with code confirm-required until the same call is repeated with confirm true.

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": "save_loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe loan to update, from list_loans. Omit it to create a new loan.
cashNoTrue when payments can be made from this loan's account, e.g. a credit facility drawn like a bank account. A new loan without it is not cash. Omit it to leave it as it is.
nameNoWhat the business calls the loan, e.g. Vehicle finance. A new loan needs a lender.
rateNoYearly interest rate as a percentage, e.g. 11.5.
notesNoFree-text notes.
amountNoWhat was borrowed, in the loan's currency. Not the balance still owed.
lenderNoWho lent the money: a bank, a director, a family member.
confirmNoSend true only after the user agrees, when an update came back with code confirm-required: the opening date is later than entries already on the loan's account.
currentNoTrue when the loan is due within a year (a current liability). Only read when the loan is created.
archivedNoTrue to archive a loan that is paid off.
currencyNoISO currency code, e.g. ZAR. Omit for the business's own currency.
openingdateNoDate the opening balance applies from, yyyy-MM-dd.
openingbalanceNoWhat was still owed on openingdate, for a loan that started before the business used stub. 0 clears it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / cash
      Added value: +{
      +  "description": "True when payments can be made from this loan's account, e.g. a credit facility drawn like a bank account. A new loan without it is not cash. Omit it to leave it as it is.",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds real behavior beyond that: a new loan creates its own liability account (a side effect), an id belonging to another business is refused with code loan-not-found, and a late opening date is refused unwritten with code confirm-required. Error codes, the unwritten guarantee, and the confirmation gate are exactly the kind of detail annotations cannot carry.

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?

Four sentences, front-loaded with the create/update split before the error clauses, and every sentence carries information. The error sentences are tightly packed and the phrase 'unwritten, with code confirm-required' reads awkwardly, but there is no filler.

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 13-parameter mutation with no output schema, the description covers the create/update decision, the side effect, the confirmation retry, and two failure codes. It never says what a successful call returns (e.g. the new loan id or its account), which matters given there is no output schema to fall back on.

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 baseline is 3, but the description earns above baseline by supplying a conditional requirement the schema cannot express (required is empty, yet 'omit it to create one, which needs a lender') and by tying `confirm` to the confirm-required error path. It does not add meaning for the remaining parameters such as currency, archived, or current, which is why it stops short of 5.

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 pair and resource ('Create or update a loan: money the business owes') and immediately distinguishes the two modes by the presence of `id`. An agent can tell this apart from list_loans and the other save_* tools 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: 'Pass an `id` from list_loans to update that loan; omit it to create one, which needs a lender.' It also describes the retry path for the confirm-required case, so both the selection and the follow-up condition are spelled out rather than inferred.

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