Skip to main content
Glama

Finalize document upload

finalize_document_upload

Confirm an upload and attach it to its record: checks the object is really there, reads size and MIME type from storage, and sets the path on the target — document_url and document_name for a personnel_credential, cv_file_url for a person, a new row in tender_documents or grant_documents for a procedure. Refuses a path that does not belong to this tenant, and refuses a file type that is not among PDF, image, Office, text, csv, zip or mail.

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": {
      "path": "<path>"
    },
    "name": "finalize_document_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesExactly the storage_path from create_document_upload_url.
notesNo
document_typeNoFor entity tender: the kind of document, e.g. "Leistungsbeschreibung". Default "sonstiges".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the internal validation chain (existence check, size and MIME read from storage) and two explicit refusal conditions: a path outside this tenant and a disallowed file type. Naming 'a new row in tender_documents or grant_documents' also clarifies that repeated calls append rather than replace, consistent with idempotentHint=false. Missing is what a partial failure leaves behind and what the call returns.

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?

The core action and its effect are front-loaded in the opening clause, with entity-specific destinations enumerated compactly in one em-dash list. It is dense but every clause carries information; the allowed-file-type list is slightly long for the value it delivers.

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 non-idempotent write with no output schema, the definition covers the mutation's targets, its validations and its rejection cases, which is most of what an agent needs before calling. It stops short of describing the response or failure recovery, but the essential pre-call information is present.

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 67%, so the schema already documents all three parameters. The description reinforces the meaning of path (tenant-scoped, MIME-restricted) but says nothing about `notes` or how `document_type` is consumed for tender targets beyond the schema's own note, so it adds only modest value over the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Uses a specific verb+resource ('Confirm an upload and attach it to its record') and enumerates the concrete effects per target entity (document_url/document_name for personnel_credential, cv_file_url for person, new row in tender_documents/grant_documents). It does not name the near-identical siblings finalize_dossier_image_upload / finalize_dossier_media_upload, so the agent must infer which finalize tool applies from the entity list alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Confirm an upload' implies it is the step after a URL has been created, but the ordering to create_document_upload_url appears only in the schema's path description, not here. No exclusions are given, and cancel_document_upload is never mentioned as the alternative when the upload should be abandoned, so usage is implied rather than 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.

Resources