Skip to main content
Glama

Ladda upp underlag till verifikat

add_voucher_underlag

Laddar upp en liten fil, t.ex. ett kvitto eller en faktura, som underlag och kopplar den valfritt till ett verifikat. Använd när filen inte redan finns i Kvickd och är liten nog att skicka base64-kodad. Finns filen redan i inkorgen eller bland underlagen, använd attach_underlag; är den stor (t.ex. ett foto), använd create_underlag_upload; gäller den en avstämning (kontoutdrag, avtal), använd upload_underlag. Returnerar underlagets id, filnamn, filtyp, storlek och verifikat-id (null om det inte kopplats). Bieffekt: filen sparas bland bolagets underlag; utan voucher_id hamnar den i underlagspoolen och kan kopplas senare med attach_underlag. Kräver behörigheten upload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFilnamn med filändelse, t.ex. kvitto-2026-03-14.pdf.
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
voucher_idNoValfritt: id (heltal) på verifikatet som underlaget ska kopplas till, t.ex. från list_vouchers eller svaret från book_voucher. Utelämna för att lägga underlaget i underlagspoolen.
content_base64YesFilens innehåll, base64-kodat. Passar små filer; för stora filer, använd create_underlag_upload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / content_base64 / description
      Added value: +"Filens innehåll, base64-kodat. Passar små filer; för stora filer, använd create_underlag_upload."
    • addedInput schema / properties / name / description
      Added value: +"Filnamn med filändelse, t.ex. kvitto-2026-03-14.pdf."
    • 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 / voucher_id / description
      Added value: +"Valfritt: id (heltal) på verifikatet som underlaget ska kopplas till, t.ex. från list_vouchers eller svaret från book_voucher. Utelämna för att lägga underlaget i underlagspoolen."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (which only declare non-readonly, non-idempotent, non-destructive), the description discloses the persistent side effect (file saved among the company's underlag), the pool behavior when voucher_id is omitted, the required 'upload' permission, and the return payload. This is exactly the behavioral context annotations cannot carry.

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?

Purpose first, then routing rules, then return values, side effects and the permission requirement — every sentence carries distinct information with no filler, despite the length the content is front-loaded and scannable.

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?

There is no output schema, but the description enumerates the return fields (id, filename, filetype, size, voucher-id or null), states the side effect, links all four sibling alternatives and the permission prerequisite. An agent has everything needed to select and 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?

With 100% schema coverage the schema already documents all four parameters, so the baseline is 3. The description still adds meaning beyond the schema by tying content_base64 to the 'small file' constraint and explaining that omitting voucher_id routes the file into the underlag pool for later linking with attach_underlag.

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 ('Laddar upp en liten fil ... som underlag och kopplar den valfritt till ett verifikat') with the distinguishing scope condition (small, base64-encoded, optionally linked to a voucher). An agent can tell it apart from attach_underlag, create_underlag_upload and upload_underlag 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?

Explicit when-to-use ('Använd när filen inte redan finns i Kvickd och är liten nog att skicka base64-kodad') followed by three named alternatives with the exact condition that selects each: existing file -> attach_underlag, large file -> create_underlag_upload, reconciliation -> upload_underlag. 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