Skip to main content
Glama

Laadi ostuarve üles

upload_purchase_invoice

Laadi üles ostuarve fail (PDF, PNG või JPG, kuni 10 MB) base64-kujul. Uuno loeb selle OCR-iga ja töötleb nagu e-postiga saabunud arve: tuntud tarnija ja muutmata pangakontoga arve kinnitub automaatselt, uus tarnija või muutunud konto jääb kasutajale ülevaatusele. Sama faili teist korda ei laadita (tagastab olemasoleva arve). Tagastab uploadId — seisu vaata get_upload_status abil (OCR võtab tavaliselt 10–60 s). Üks fail kutse kohta; ZIP-i ja e-arve XML-i siin ei toetata.

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": {
      "filename": "<filename>",
      "contentBase64": "<contentBase64>"
    },
    "name": "upload_purchase_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesFailinimi koos laiendiga, nt "telia-2026-09.pdf"
contentBase64YesFaili sisu base64-kodeeringus (ilma data:-eesliiteta)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses the OCR pipeline, the auto-confirmation rule (known supplier + unchanged bank account), the human-review fallback, content-based duplicate suppression, and the 10–60 s processing window — real behavioral value. The only gap is that it does not reconcile the "same file returns the existing invoice" dedup with idempotentHint=false, leaving a slight ambiguity about repeated calls with different filenames but identical content.

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?

The upload action and format constraints are front-loaded, followed by the processing outcome, the async hand-off, and the exclusions. Every sentence carries distinct information — no restatement of the name or title.

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 two-parameter async upload with no output schema, the description covers the return value (uploadId), how to poll it, latency expectations, dedup behavior, and unsupported inputs. The only thing an agent might still want is the failure/error shape, which is a minor omission.

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; the description adds meaning the schema lacks by constraining the accepted file types (PDF, PNG, JPG), the 10 MB size limit, and the single-file-per-call rule, which materially affects what goes into filename/contentBase64.

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 ("Laadi üles ostuarve fail") plus the accepted formats and size ceiling, and it names the follow-up sibling get_upload_status so the agent can tell this apart from status polling and listing tools. Nothing about the intent needs inference.

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 explicit operating conditions: one file per call, no ZIP or e-invoice XML, and it routes the agent to get_upload_status for the async result. What is missing is any statement of when a purchase invoice should be uploaded here versus entering it another way (e.g. via list_purchase_invoices/create_sales_invoice_draft paths), but for an upload endpoint the guidance is otherwise clear.

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