Skip to main content
Glama

Upload File

upload_file

Uploads a source file and returns a fileId to translate it with.

Free. Never charged: pages are spent when a translation finishes, not on upload or retrieval, so a file you never translate costs nothing.

Authentication: a vq_key_ key holding translate:write. A wildcard (*) key does not hold it: grant it by name in the dashboard.

Why this route exists

POST /translation/documents does not accept a URL. It accepts the fileId returned here, which refers to a file this API stored for your account. That is deliberate: the API never fetches an address you name, so it cannot be pointed at an internal service or at someone else's document. A fileId from another account is a 404.

Limits

  • Types: pdf, docx, txt, jpg, jpeg, png, tif, tiff, webp, bmp.

  • Size: at most 150 MB, and not empty.

  • A fileId is valid for 24 hours. You can translate one file into several languages by posting /documents more than once with the same fileId.

pageCount

Physical pages for pdf and docx, which is what you will be charged. For images and plain text it is null: their page count is only known when the job runs, and POST /documents can then only check you hold at least one page.

Example

curl -X POST https://api.vaquill.ai/api/v1/translation/files \
  -H "Authorization: Bearer $VAQUILL_API_KEY" \
  -F "file=@petition.pdf"
{
  "fileId": "3f2c9a52-8d2e-4a43-9e0b-5b6a1c7d9f10",
  "filename": "petition.pdf",
  "sizeBytes": 482113,
  "pageCount": 12,
  "expiresAt": "2026-11-02T12:34:56Z"
}

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": {
      "file": "<file>"
    },
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesThe document to translate.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false) by disclosing the required `translate:write` scope, the wildcard-key caveat, that uploads are free and pages are not charged, the 24-hour `fileId` lifetime, and cross-account 404 behavior. The security rationale for refusing URLs is behavior an agent could not infer from structured fields.

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 purpose, cost, and auth before the detail sections, and headings make it scannable. The full response JSON example is partly redundant because an output schema exists, adding length that the agent may not need.

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?

For a one-parameter upload tool this covers everything an agent needs: auth scope, cost model, size/type limits, expiry and reuse semantics, and how downstream `create_document` consumes the result. Return values are already covered by the output schema, so the extra example is a bonus rather than a completeness crutch.

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% with one documented parameter, so the baseline is 3; the description earns above baseline by adding real constraints on `file` — accepted MIME types, 150 MB maximum, non-empty requirement — that the schema itself does not convey.

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 ('Uploads a source file') plus the concrete artifact produced ('returns a `fileId` to translate it with'). It also carves out its position relative to `create_document`, making the two distinguishable without opening 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 Guidelines4/5

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

The 'Why this route exists' section makes the workflow dependency explicit: `POST /translation/documents` (create_document) accepts a `fileId` here, not a URL, so this call is a prerequisite. It stops short of stating when a caller should prefer `translate_text` or `fetch` instead, which is the only routing gap.

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.