Skip to main content
Glama

commit_loan

Saves a prepared loan preview after the user confirms it, using only the preview draft ID. Handles expired drafts or name conflicts by requiring a new preview and confirmation.

Instructions

Saves the loan preview_loan prepared, exactly as previewed: pass only its draftId, and only after the user said yes to this exact preview. advisor.draft_not_found means the preview expired (30 minutes), was used already or is another user's: prepare a new preview and ask for yes again. advisor.loan_exists means the name was taken meanwhile; advisor.draft_stale means its member or currency was renamed or removed: prepare a new preview. Answers the saved row, loanLineThisMonth (true when the month wizard now lists this loan's payment line), the preview's warnings (loan_balance_differs among them) and nextStep.

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": {
      "draftId": "<draftId>"
    },
    "name": "commit_loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
draftIdYesThe draftId preview_loan answered for the loan the user said yes to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare only readOnlyHint=false, so the description must carry the behavioral load and it does: 30-minute expiry, single-use drafts, ownership scoping, three distinct error codes with their causes and remedies, and the returned fields (saved row, loanLineThisMonth, warnings, nextStep). This is far more than the mutation hint the annotations provide.

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?

Content is front-loaded with the action and precondition first, then error handling, then return values. It is a single dense paragraph and the chain of advisor.* error codes reads as a run-on, but nearly every clause carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, yet the description enumerates what is returned, including the loanLineThisMonth side effect and embedded warnings such as loan_balance_differs. Combined with the full failure-mode coverage, an agent has everything needed to call and interpret it.

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 would be 3. The description nevertheless adds real meaning: the draftId must be the one preview_loan answered for the loan the user approved, and no other parameters may be supplied. It stops short of any format detail, but none appears needed for an opaque id.

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?

"Saves the loan preview_loan prepared, exactly as previewed" gives a specific verb (saves) plus resource (loan) and explicitly binds the tool to its sibling preview_loan. An agent can distinguish it from preview_loan, save_account_lines or commit_statement 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 Guidelines5/5

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

It states the exact precondition ("only after the user said yes to this exact preview") and the input constraint ("pass only its draftId"). It also prescribes the recovery path for each failure mode, e.g. draft_not_found/draft_stale → prepare a new preview and ask for yes again, loan_exists → the name was taken meanwhile. 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.