Skip to main content
Glama

upload_document

Upload an INVOICE or RECEIPT (PDF, image, or .zip of them) for analysis. file_base64 is the file's raw bytes, base64-encoded. direction is payable (incoming supplier invoice) or receivable (outgoing). Creates Item(s) and queues extraction.

This door is invoices-only: it never routes a file onward by type, so a bank statement, a journal export or a balance sheet sent here is analysed and then just sits as a document. For anything that is not an invoice — or when you are not sure what the file is — use upload_intake.

Input Schema

NameRequiredDescriptionDefault
filenameYes
directionNopayable
company_idYes
file_base64Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key side effects: it 'Creates Item(s) and queues extraction', and it explains the misrouting behavior. It stops short of stating permission requirements, whether uploads are idempotent, or limits on file size/count.

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-loads the purpose and accepted types, then the routing warning in a clearly marked final paragraph. Slightly verbose around the backtick-quoted parameter names, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 0%-coverage, no-annotation, no-output-schema mutation tool, the purpose and routing story are complete, but gaps remain: two parameters are undefined and no auth/idempotency behavior is given. Adequate but not fully self-contained.

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 0%, so the description must compensate. It usefully defines file_base64 (raw bytes, base64-encoded) and direction (payable vs receivable), covering two of four parameters, but leaves filename and company_id undocumented in both the schema and the description.

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 ('Upload an INVOICE or RECEIPT ... for analysis') and immediately scopes the file types accepted (PDF, image, .zip). It also explicitly distinguishes itself from the sibling upload_intake, so an agent can route without inspecting either 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?

Gives an explicit when-not: 'For anything that is not an invoice — or when you are not sure what the file is — use upload_intake.' It also describes the consequence of misrouting (file is analysed and sits as a document), which is exactly the decision support an agent needs.

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