Skip to main content
Glama

Uppladdningslänk för stor fil

create_underlag_upload

Skapar en kortlivad uppladdningslänk för en stor fil, t.ex. ett foto av ett kvitto, så att filen inte behöver skickas base64-kodad genom modellen. Använd när filen är för stor för ett vanligt verktygsanrop; små filer laddas upp direkt med add_voucher_underlag (till ett verifikat) eller upload_underlag (till en avstämning). Returnerar en URL som filens råa bytes PUT:as till (t.ex. med curl), hur länge länken gäller och största tillåtna storlek. Bieffekt: inget sparas förrän filen har PUT:ats; då blir den ett dokument vars document_id kan kopplas till ett verifikat med attach_underlag. Kräver behörigheten upload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFilnamn med filändelse, t.ex. kvitto-2026-03-14.jpg.
orgnrYesBolagets organisationsnummer, 10 siffror med eller utan bindestreck, t.ex. 559900-1004. Hämta med list_companies.
content_typeNoValfritt: filens MIME-typ, t.ex. image/jpeg eller application/pdf.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / content_type / description
      Added value: +"Valfritt: filens MIME-typ, t.ex. image/jpeg eller application/pdf."
    • addedInput schema / properties / name / description
      Added value: +"Filnamn med filändelse, t.ex. kvitto-2026-03-14.jpg."
    • 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.7/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description adds substantial context beyond them: the exact return payload (URL, expiry, max size), the required permission ('upload'), and the crucial side effect that nothing is persisted until the PUT, after which a document_id exists that can be linked via attach_underlag.

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, then routing guidance, return shape, side effect, and permission requirement. Every sentence carries distinct information; nothing is repeated from the schema or annotations.

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?

With no output schema and only three simple parameters, the description supplies the missing pieces an agent needs: the asynchronous two-step workflow, the return values, the permission prerequisite, and the downstream attach_underlag link.

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 name, orgnr and content_type are already documented in the schema with examples. The description adds no field-level syntax or format detail beyond that, so the baseline of 3 applies.

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 ('Skapar en kortlivad uppladdningslänk för en stor fil') plus the reason (avoid base64 through the model) and a concrete example. It clearly distinguishes itself from add_voucher_underlag and upload_underlag by naming both as the small-file path.

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 är för stor för ett vanligt verktygsanrop') and when-not ('små filer laddas upp direkt med add_voucher_underlag ... eller upload_underlag'), with named alternatives and their targets. 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