Skip to main content
Glama

Enviar un documento al caso

upload_document

Sends one of the person's documents to their open case: PDF, JPG or PNG, up to 10 MB, as base64 or a public https URL. Needs the case_id and the access code from the email the person got (ask them for it). The document is stored and checked as if the person uploaded it on their link. "document_type" is the kind the service asks for (list_services.services[].document.kind) or "documento".

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": {
      "case_id": "<case_id>",
      "access_code": "<access_code>",
      "document_type": "<document_type>"
    },
    "name": "upload_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoAlternatively, a public https URL to download the file from.
case_idYes
filenameNo
access_codeYesThe code from the person's email, e.g. "ABCD-2345".
document_typeYes
content_base64NoThe file in base64 (a data: URL is also accepted).

Output Schema

NameRequiredDescriptionDefault
textYes
receivedYes
duplicateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (openWorldHint, non-idempotent, non-destructive), the description discloses auth requirements (access code), accepted formats and a 10 MB size ceiling, and the important behavioral fact that the file is stored and checked exactly as if the person had uploaded it themselves. It does not address retry behavior for a non-idempotent call or what happens if validation rejects the file.

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 the action and its limits, then prerequisites, then the document_type rule. Dense but every clause carries information; the final sentence on document_type could have been folded into the prerequisites sentence for tighter flow.

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?

An output schema exists, so return values need no explanation, and the description covers the non-obvious parts: auth code provenance, format and size limits, and how the file is treated after upload. Minor gaps remain around error/failure behavior and the optional filename, but the definition is sufficient to call the tool correctly.

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?

With 50% schema coverage the description carries real weight: it explains that the access_code comes from the person's email, that document_type must match a kind returned by list_services or default to 'documento', and that the file may arrive as base64 or a public https URL. It says nothing about case_id or filename, leaving half the parameters to the schema.

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 ('sends one of the person's documents to their open case') with scope constraints (PDF/JPG/PNG, 10 MB, base64 or https URL). This is clearly distinct from the read-oriented siblings (case_status, list_services, get_service) and from start_case.

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?

Gives concrete prerequisites and an explicit instruction to obtain the access code from the person's email ('ask them for it'), and routes the agent to list_services.services[].document.kind to pick document_type, with 'documento' as fallback. It does not state when not to use this tool or what to do if the case is closed, but the usage context 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