Skip to main content
Glama

Complete document upload

complete-document-upload
Idempotent

Store a file uploaded with create-document-upload as a document.

WHEN TO USE: After the upload command succeeded.

RETURNS: The new document's id, title, folder and its stored file (name, size, SHA-256). Name it as an event's evidence by passing document_id to create-event-block (an invoice, a vendor bill, a receipt) or record-statement-balance (a statement); read the file's text with read-document-file.

NOTES: The file is checked (a real PDF, within the size cap) and hashed; a file that fails is discarded. Completing the same upload twice returns the same document. A stored file is not searchable with search-documents.

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": {
      "upload_id": "<upload_id>",
      "title": "<title>"
    },
    "name": "complete-document-upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoTags for filtering
titleYesDocument title (e.g. 'Operating Checking statement, Sept 2026')
folderNoFolder for organization (e.g. 'statements')
upload_idYesThe upload_id create-document-upload returned

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?

Annotations already cover mutability and idempotency, but the description adds substantive behavior: the file is validated as a real PDF within a size cap and hashed, and a failing file is discarded. The NOTES also disclose that repeating the same upload returns the same document and that stored files are excluded from search-documents results. Some idempotency restating is redundant with idempotentHint, and permission requirements are unaddressed.

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-loaded with a single-sentence purpose, then clearly headed WHEN TO USE, RETURNS, and NOTES sections that separate decision guidance from outcome information. Slightly verbose in the RETURNS enumeration, but every sentence carries usable signal.

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?

No output schema exists, so the description supplies the return contract (id, title, folder, file name/size/SHA-256) itself and additionally explains the downstream consumption patterns. For a four-parameter completion tool with annotations, nothing an agent needs to invoke it correctly is missing.

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 coverage is 100%, so all four parameters are already documented in the schema. The description adds no syntax, format, or constraint detail about upload_id, title, folder, or tags beyond what the schema states, so baseline 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 ('Store a file... as a document') and names its predecessor explicitly ('uploaded with create-document-upload'), which cleanly separates it from the sibling that starts the upload. It also distinguishes itself from read-document-file and search-documents by naming both.

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?

'WHEN TO USE: After the upload command succeeded' gives a clear trigger condition, and the RETURNS section routes the agent onward to create-event-block, record-statement-balance, and read-document-file. It lacks an explicit 'do not use if' case for the completion step itself, but the boundary that a stored file is not searchable is stated.

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.