Skip to main content
Glama

Mailrun Agent Identity

Prepare a file upload

prepare_upload

Get a short-lived signed URL to upload a file from your own shell, so the bytes never pass through your context. Then run the returned next_step command (a curl PUT of the file) and pass the upload_id to upload_voicemail_greeting_audio or upload_knowledge. The URL accepts one PUT of exactly size_bytes within 15 minutes; the received file is kept one hour for the tool that uses it. Prefer this over content_base64 for anything beyond a few kilobytes.

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": {
      "purpose": "<purpose>",
      "filename": "<filename>",
      "size_bytes": "<size_bytes>"
    },
    "name": "prepare_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
purposeYesWhat the file is for; the limits of that tool apply (greeting 5 MB MP3/WAV, knowledge 20 MB PDF/DOCX/text/Markdown/CSV/HTML).
filenameYesThe file name with its extension.
size_bytesYesExact size of the file in bytes; the PUT must match it.
content_typeNoOptional media type for the Content-Type header of the PUT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations it discloses the constraints an agent could not otherwise infer: single PUT, exact size_bytes match, 15-minute URL validity, and one-hour file retention. This is coherent with idempotentHint=false (one-shot URL) and destructiveHint=false, and it clarifies how bytes bypass the model context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then follow-up steps, then constraints and the alternative rule. Every sentence carries operational information; nothing is padding.

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?

There is no output schema, but the description explains what comes back (next_step command, upload_id) and how to use it, which is exactly the missing piece. Combined with the fully documented schema, an agent has everything needed to call this 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?

Schema coverage is 100%, so the baseline is 3; each parameter is already documented, including the per-purpose size/format limits. The description reinforces the coupling between size_bytes and the PUT ('exactly size_bytes') but adds no new per-parameter detail beyond what the schema states.

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 ('Get a short-lived signed URL to upload a file') plus the rationale. It also names the two downstream tools that consume the upload_id, so an agent can place it precisely in the workflow rather than confusing it with upload_voicemail_greeting_audio or upload_knowledge.

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?

Explicit sequencing ('Then run the returned next_step command ... pass the upload_id to ...') and an explicit preference rule: 'Prefer this over content_base64 for anything beyond a few kilobytes.' Both when-to-use and the alternative are 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