Skip to main content
Glama

Koppla befintligt underlag till verifikat

attach_underlag

Kopplar underlag som redan finns i Kvickd till ett verifikat, även ett som redan är bokfört. Använd för fakturor och kvitton i inkorgen eller uppladdade dokument (document_ids) och för underlag i underlagspoolen (underlag_ids); hämta id med list_available_underlag. Ska en ny fil laddas upp, använd add_voucher_underlag eller create_underlag_upload. Returnerar verifikatets id och de kopplade underlagen. Bieffekt: underlagen kopplas till verifikatet; själva bokföringen ändras inte. Kräver behörigheten book.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
voucher_idYesId (heltal) på verifikatet som underlagen ska kopplas till, t.ex. från list_vouchers.
document_idsNoValfritt: lista med dokument-id (heltal) från inkorgen eller dokumentarkivet, t.ex. [12, 15]. Hämta med list_available_underlag.
underlag_idsNoValfritt: lista med underlags-id (heltal) från underlagspoolen, t.ex. [7]. Hämta med list_available_underlag.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / document_ids / description
      Added value: +"Valfritt: lista med dokument-id (heltal) från inkorgen eller dokumentarkivet, t.ex. [12, 15]. Hämta med list_available_underlag."
    • addedInput schema / properties / orgnr / description
      Added value: +"Bolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies."
    • addedInput schema / properties / underlag_ids / description
      Added value: +"Valfritt: lista med underlags-id (heltal) från underlagspoolen, t.ex. [7]. Hämta med list_available_underlag."
    • addedInput schema / properties / voucher_id / description
      Added value: +"Id (heltal) på verifikatet som underlagen ska kopplas till, t.ex. från list_vouchers."
  2. 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: it discloses that it works on already-booked vouchers, that the side effect is only an attachment (bookkeeping itself is unchanged), that the book permission is required, and what is returned. None of this is derivable from the readOnly/destructive/idempotent hints alone.

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-loads the core action, then groups use-cases, alternatives, return, side effect, and permission into tight sentences. Every sentence carries information an agent needs; there is no filler.

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?

Although there is no output schema, the description states the return shape (voucher id and attached underlag), the permission requirement, and the mutation boundary. For a 4-parameter mutation tool this covers everything needed to invoke it correctly.

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, but the description adds real semantic value: it maps document_ids to inbox/uploaded documents and underlag_ids to the underlagspool, and points to list_available_underlag for retrieval. It stops short of noting that at least one of the two optional arrays is presumably required for a meaningful call.

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 (attach existing underlag to a verifikat) and immediately distinguishes itself from siblings add_voucher_underlag and create_underlag_upload for new uploads. The agent can tell what this does and what it does not 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?

Explicitly names when to use it (existing documents, including on already-booked vouchers), which two parameter paths apply, how to get the ids (list_available_underlag), and redirects to add_voucher_underlag/create_underlag_upload when a new file must be uploaded. 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.

Resources