Skip to main content
Glama
OpenLMNP

OpenLMNP

Update Expense

update_expense
Destructive

Updates an existing operating expense by modifying only the fields you provide, including amount, category, VAT rate, date, recurrence, and business-use percentage.

Instructions

Met à jour une charge d'exploitation existante. Seuls les champs fournis sont modifiés (mise à jour partielle). Le montant est en euros.

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": {
      "expense_id": "<expense_id>"
    },
    "name": "update_expense"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoNotes libres
amountNoMontant TTC en euros
categoryNoCatégorie : property_tax, insurance, energy, maintenance, supplies, platform_fees, accounting, telecom, travel, cleaning, other
tva_rateNoTaux de TVA en pourcentage (ex: 20 pour 20%)
expense_idYesIdentifiant de la charge à mettre à jour
descriptionNoDescription de la charge
expense_dateNoDate de la charge au format Y-m-d
is_dedicatedNoCharge 100% dédiée à la location ou au prorata
recurring_typeNoType de récurrence : once, monthly, quarterly, yearly
business_use_percentNoPart d'usage pour la location en pourcentage, pour une charge aussi personnelle (ex: 30 pour un forfait téléphone utilisé à 30 % pour la location). 100 = entièrement à la location. S'applique avant la quote-part surface.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.0.1
    • addedInput schema / properties / amount / description
      Added value: +"Montant TTC en euros"
    • addedInput schema / properties / business_use_percent
      Added value: +{
      +  "description": "Part d'usage pour la location en pourcentage, pour une charge aussi personnelle (ex: 30 pour un forfait téléphone utilisé à 30 % pour la location). 100 = entièrement à la location. S'applique avant la quote-part surface.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / category / description
      Added value: +"Catégorie : property_tax, insurance, energy, maintenance, supplies, platform_fees, accounting, telecom, travel, cleaning, other"
    • addedInput schema / properties / description / description
      Added value: +"Description de la charge"
    • addedInput schema / properties / expense_date / description
      Added value: +"Date de la charge au format Y-m-d"
    • addedInput schema / properties / expense_id / description
      Added value: +"Identifiant de la charge à mettre à jour"
    • addedInput schema / properties / is_dedicated / description
      Added value: +"Charge 100% dédiée à la location ou au prorata"
    • addedInput schema / properties / notes / description
      Added value: +"Notes libres"
    • addedInput schema / properties / recurring_type / description
      Added value: +"Type de récurrence : once, monthly, quarterly, yearly"
    • addedInput schema / properties / tva_rate / description
      Added value: +"Taux de TVA en pourcentage (ex: 20 pour 20%)"
  2. First observedv0.1.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations supply only destructiveHint=true, which is unexplained and somewhat at odds with a described partial update; the description adds genuinely useful behavior ('only supplied fields are modified'), clarifying that unspecified fields survive. It does not disclose what makes the call destructive, whether changes are reversible, whether permissions or a locked/validated accounting period are required, or how recurring_type changes affect generated entries. That is a meaningful gap for a mutation tool flagged destructive.

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 short sentences, front-loaded with the purpose followed by the partial-update rule and the currency note; nothing is padded. The currency sentence is largely redundant with the schema and could be dropped, keeping it just short of a 5.

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

Completeness3/5

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

For a ten-parameter mutation with no output schema, the description covers the core semantics (existing record, partial update, currency) and the schema covers every field. It stops short of the operational context an agent needs before writing: permission requirements, whether destructiveHint implies data loss on recurring expenses, and what is returned on success or failure.

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 description coverage is 100%, so all ten parameters including the tva_rate, business_use_percent and category vocabularies are already documented in the schema. The description's only added meaning is the euro-denominated amount, which duplicates the schema's 'Montant TTC en euros'. Baseline 3 applies when the schema does the heavy lifting.

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 une charge d'exploitation existante' (updates an existing operating expense). Siblings like create_expense/delete_expense/get_expense are distinguishable by their own names, but the description itself never contrasts against them. The scoping word 'existante' at least rules out creation.

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?

The phrase 'Seuls les champs fournis sont modifiés (mise à jour partielle)' tells the agent this is a partial-update tool and that omitting a field leaves it untouched, which implicitly guides usage versus a full replacement. There is no explicit guidance on when to reach for this instead of delete_expense plus create_expense, nor any stated prerequisites such as ownership or state of the expense.

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