Skip to main content
Glama
OpenLMNP

OpenLMNP

Update Loan

update_loan
DestructiveIdempotent

Modify selected fields of an existing loan with partial updates; changing key loan or insurance fields automatically regenerates the theoretical amortization schedule unless a protected bank-imported schedule exists.

Instructions

Met à jour les champs d'un emprunt existant. Seuls les champs fournis sont modifiés (mise à jour partielle). Les montants (amount, monthly_payment, insurance_monthly, fees_amount, early_repayment_amount) sont en euros. Si amount, annual_rate, duration_months, start_date ou les champs d'assurance changent, le tableau d'amortissement théorique est régénéré automatiquement, sauf si l'emprunt porte un tableau importé depuis la banque (protégé, voir compute_loan_schedule pour l'écraser volontairement).

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": {
      "loan_id": "<loan_id>"
    },
    "name": "update_loan"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoCapital emprunté en euros
loan_idYesIdentifiant de l'emprunt à modifier
bank_nameNoNom de la banque
start_dateNoDate de la 1ère échéance (Y-m-d)
annual_rateNoTaux nominal annuel en %
fees_amountNoFrais d'emprunt en euros
fees_paid_onNoDate de paiement des frais (Y-m-d)
is_dedicatedNoEmprunt dédié à 100 % au logement loué, sans quote-part
insurance_rateNoTaux annuel de l'assurance en %, si insurance_type=variable
insurance_typeNofixed ou variable
duration_monthsNoDurée totale en mois
monthly_paymentNoMensualité hors assurance en euros (0 = calcul automatique)
insurance_monthlyNoMontant mensuel de l'assurance en euros, si insurance_type=fixed
fees_spread_methodNolinear (fractions égales) ou interest (prorata des intérêts courus)
early_repayment_dateNoDate d'un remboursement anticipé (Y-m-d)
early_repayment_amountNoCapital remboursé par anticipation à cette date, en euros

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare idempotentHint and destructiveHint, so the burden is lower; the description nonetheless adds real value by disclosing the automatic regeneration of the amortization schedule and the protection of bank-imported schedules — a destructive consequence not visible in the schema. It does not cover response shape or failure behavior for an invalid loan_id, keeping it below 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?

Three sentences, front-loaded with the purpose and partial-update rule, then the unit convention, then the side-effect caveat. The long final sentence is dense with parenthetical lists but every clause carries operational meaning; nothing is redundant.

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 16-parameter mutation with no output schema, the definition covers the essentials an agent needs: which fields are optional, currency units, and the schedule-regeneration consequence with its escape hatch. Remaining gaps (return value, behavior on unknown loan_id, permission needs) are modest given the annotations.

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 defining the currency (euros) for all five amount fields and by identifying the exact subset of parameters whose change triggers schedule regeneration — cross-parameter semantics the schema cannot express.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Met à jour les champs d'un emprunt existant') and immediately clarifies the partial-update semantics, which distinguishes it from create_loan. It also names compute_loan_schedule as the way to deliberately overwrite a protected schedule, though it does not explicitly contrast itself with get_loan.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Gives a clear condition for the hidden side effect (which field changes trigger schedule regeneration) and points to the alternative tool (compute_loan_schedule) when the agent intends to overwrite a bank-imported schedule. No explicit 'do not use for X' exclusion, so not a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.