Skip to main content
Glama

prepare_file

Reserve a file slot (PDF, Excel, or image, max 10MB), then PUT the bytes to upload_url with Bearer. Needs a terminal or HTTP client. No terminal? Use send_file or upload_file with a url, or content_base64 for files up to 2 MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoAgent token, if not sent as the Authorization: Bearer header.
filenameYesName with extension, for example report.pdf.
media_typeNoFor example application/pdf. Guessed from the name if missing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / filename / description
      Added value: +"Name with extension, for example report.pdf."
    • addedInput schema / properties / media_type / description
      Added value: +"For example application/pdf. Guessed from the name if missing."
    • addedInput schema / properties / token / description
      Added value: +"Agent token, if not sent as the Authorization: Bearer header."
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The description discloses meaningful behavioral details beyond annotations: the two-step reserve-then-PUT flow, Bearer authentication, the 10MB limit, and accepted file types. It does not fully disclose details like upload_url expiry or how the response is structured, but with no output schema and minimal annotations, it carries the behavioral burden reasonably well.

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?

The description is two sentences with no filler. The core action is front-loaded, followed by practical constraints and then alternative tools. Every sentence earns its place.

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 tool with only 3 parameters and no nested objects or output schema, the description covers the essential flow, constraints, and alternatives. The main gap is that it does not explicitly say how the agent will receive upload_url in the response, but the phrase 'PUT the bytes to upload_url' makes this reasonably inferable.

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%, so the baseline is 3, but the description adds value by specifying the max file size (10MB), supported formats (PDF, Excel, image), and the requirement to PUT to upload_url. This is more than the schema alone provides.

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?

The description states a specific verb and resource: 'Reserve a file slot' and then explains the follow-up PUT to upload_url. It also distinguishes itself from sibling tools like send_file and upload_file by specifying the file size and method. An agent can clearly tell what prepare_file does and what it is not.

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?

The description explicitly says when to use this tool: when you have a terminal or HTTP client. It also names alternatives for the no-terminal case: send_file, upload_file, and content_base64. This gives the agent both a positive condition and an exclusion condition.

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