Skip to main content
Glama

Ändra verifikatförslag

edit_voucher_draft
DestructiveIdempotent

Ändra ett väntande verifikatförslag (draft) innan det godkänns. Kräver behörigheten 'reconcile'. Argument: orgnr, draft_id; valfritt date (YYYY-MM-DD), series, text, lines, note. Rader: [{account, debit_ore, credit_ore, text?}] i öre med exakt ett belopp skilt från noll per rad, eller [{account, amount_ore, text?}] med tecken (debet positivt, kredit negativt). Raderna kommer tillbaka med båda formaten från list_voucher_drafts och get_voucher.

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": {
      "orgnr": "<orgnr>",
      "draft_id": "<draft_id>"
    },
    "name": "edit_voucher_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNo
noteNo
textNo
linesNo
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
seriesNo
draft_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / orgnr / description
      Added value: +"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false, destructiveHint=true and idempotentHint=true. The description adds two things annotations cannot: the 'reconcile' authorization requirement and the constraint that only drafts can be edited before approval. It does not explain whether omitted fields are preserved or cleared, which matters for an idempotent update on a destructive tool.

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?

Front-loaded with purpose and precondition, then parameter enumeration and the non-obvious line format. Every sentence carries operational information; 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 mutation tool with no output schema and sparse schema descriptions, the definition covers purpose, permissions, all parameters and the tricky nested line format. The remaining gap is update semantics for omitted optional fields and error behavior, which an agent would need.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at only 14%, the description fully compensates: it enumerates all seven parameters, specifies date format (YYYY-MM-DD), and documents both accepted line shapes with units (öre) and sign conventions (debit positive, credit negative) plus the 'exactly one non-zero amount per row' validation rule. That is meaning well beyond the raw schema.

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?

The description states a specific verb and resource ('Ändra ett väntande verifikatförslag (draft)') and scopes it in time ('innan det godkänns'), which cleanly separates it from approve_voucher_draft and book_voucher without needing to name them.

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?

It gives a concrete precondition — the draft must be pending, not yet approved — plus the required 'reconcile' permission. It stops short of explicitly naming alternatives such as approve_voucher_draft or what to do if the voucher is already booked, so it is clear context without full when-not guidance.

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.