Skip to main content
Glama

Föreslå verifikat för attest

propose_voucher

Lägger ett verifikatförslag i kön Väntande verifikat, där en människa godkänner eller avvisar det innan något bokförs. Använd när användaren vill granska först eller när konteringen är osäker. För att bokföra direkt, använd book_voucher eller create_voucher; för en justering som hör till en avstämning (bilaga), använd create_proposal. Returnerar draft_id, serie, datum och status pending. Bieffekt: inget bokförs. Förslaget godkänns med approve_voucher_draft, ändras med edit_voucher_draft och avvisas med reject_voucher_draft. Underlag i annan valuta än SEK: gissa aldrig växelkursen. Fråga användaren efter kursen (SEK per 1 enhet) eller SEK-beloppet (t.ex. det som drogs från kontot), räkna raderna i SEK och ange currency, foreign_amount_minor och fx_rate eller total_sek_ore, så dokumenteras kursen på verifikatet. Underlag: underlag_ids (underlagspoolen) och document_ids (inkorgen, dokumentarkivet eller en stor fil uppladdad med create_underlag_upload) kopplas till förslaget och följer med till verifikatet (document_ids kräver även behörigheten upload). 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. external_ref: valfri egen referens från ditt system (t.ex. "bokning-812", högst 200 tecken), unik per bolag. Finns referensen redan på ett verifikat eller ett väntande förslag med samma datum och rader skapas inget nytt; svaret är det befintliga med duplicate=true, så ett omförsök ger ingen dubblett. Samma referens med annat innehåll är ett fel och inget skapas. Ett avvisat förslag frigör referensen. Slå upp med find_voucher. Kräver behörigheten reconcile.

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>",
      "date": "<date>",
      "lines": "<lines>",
      "text": "<text>"
    },
    "name": "propose_voucher"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateYes
noteNo
textYes
linesYes
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
seriesNoA
fx_rateNo
currencyNo
document_idsNo
external_refNo
underlag_idsNo
total_sek_oreNo
foreign_amount_minorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / document_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {},
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Document Ids"
      +}
    • addedInput schema / properties / external_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "External Ref"
      +}
  2. 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."
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: states the side effect that nothing is booked, names the draft's lifecycle tools (approve/edit/reject), documents the idempotency behavior via external_ref (duplicate=true, no new creation, conflicting content is an error, rejected draft frees the ref), states the reconcile permission requirement and the extra upload permission for document_ids, and gives explicit FX guidance. This directly enriches the annotation set without contradicting it.

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?

Front-loaded with purpose and the alternative routing, then the return values, then the FX and line-format details. Dense but every sentence carries operational content; slight density and lack of line/section separation for a long description keeps it from a 5.

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?

For a 13-parameter mutation tool with 8% schema coverage and no output schema, the description covers return fields (draft_id, series, date, pending status), side effects, idempotency, permissions, currency handling and line formats. An agent has enough to call it correctly without guessing.

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?

Schema coverage is 8%, so the description must carry the burden, and it does: it specifies lines in two accepted formats with sign conventions and the exactly-one-nonzero rule, the units (öre), underlag_ids vs document_ids sourcing, external_ref length limit and uniqueness semantics, and the FX trio (currency, foreign_amount_minor, fx_rate or total_sek_ore). This is meaningful guidance the schema does not provide.

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 and resource (propose a voucher entry into the 'Väntande verifikat' queue) plus the human approval gate before booking. It distinguishes itself from book_voucher, create_voucher and create_proposal by name.

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 explicit when-to-use conditions ('when the user wants to review first or the posting is uncertain') and names three alternatives with the condition that selects each (direct booking, reconciliation adjustment, approval/edit/reject flow). 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.