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.

Input Schema

NameRequiredDescriptionDefault
idNoThe loan to update, from list_loans. Omit it to create a new loan.
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. Added

TDQS

A4.8/5.0
Behavior5/5

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

Well beyond the readOnlyHint=false / destructiveHint=false annotations: it discloses a side effect (a new loan gets its own liability account), two named error codes (loan-not-found, confirm-required), that the refused write is left unwritten, and that the ownership check is scoped to this business. This is exactly the mutation context an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Roughly four sentences, front-loaded with the create-vs-update rule, then side effect, then the two error cases with their remedies. Nothing is repeated from the schema and no sentence is filler despite the density.

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 12-parameter mutation tool with no output schema, it covers creation, update, ownership rejection, the confirm escalation, and the account side effect. The one gap is that it never indicates what comes back on success (notably whether the new loan's `id` is returned, which an agent would need to chain a follow-up update or archive).

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 the baseline is 3; the description earns above that by adding a conditional requirement the schema does not express (the schema declares no required fields, yet a create 'needs a lender') and by linking the confirm parameter to the confirm-required flow rather than just describing it as a boolean.

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 (create/update) and resource (loan), and even defines the domain concept as 'money the business owes'. It explicitly distinguishes itself from list_loans by naming it as the id source, so an agent can separate read from write without inspecting schemas.

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?

Gives the exact decision rule: pass an `id` from list_loans to update, omit it to create, and a create requires a lender. It also prescribes the remediation path for the confirm-required case — repeat the identical call with confirm true — which is the main way this tool fails on first invocation.

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