Skip to main content
Glama

Sickle — every mailbox for your agent

Prepare an attachment upload

prepare_attachment_upload

Get a one-time link for uploading a file to attach to an email. The file itself never goes through tool arguments: run the returned upload command (curl) to send it, which needs the ability to run shell commands or make HTTP requests. Give the file's exact size in bytes. After the upload succeeds, pass the attachment_id to add_draft or email_send in attachment_ids. Files can be up to about 18 MB (25 MB once encoded).

Input Schema

NameRequiredDescriptionDefault
sizeYesThe file's exact size in bytes (e.g. from `wc -c < file` or `stat`). The upload must be exactly this long.
emailYesThe email account the file will be sent from (e.g. "user@gmail.com").
filenameYesThe name the attachment will have in the email, e.g. "invoice.pdf". A path is reduced to its last component.
mime_typeNoThe file's MIME type, e.g. "application/pdf". Guessed from the filename's extension when omitted.

Output Schema

NameRequiredDescriptionDefault
sizeYesThe size the upload must be, in bytes.
filenameYesThe filename the email will show.
mime_typeYes
expires_atYesWhen the link stops working, as RFC 3339. An uploaded file stays usable for 15 minutes after it arrives.
upload_urlYesWhere to PUT the file. It works once, without an Authorization header.
attachment_idYesThe file's ID. Once the file is uploaded, this is what the send tools take.
upload_commandYesThe command that uploads the file; replace <path> with the file's local path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the annotations: the link is one-time, the file bytes never go through tool arguments, an external curl/HTTP step is required, the exact byte size must be supplied, and there are size limits (~18 MB, 25 MB encoded). These are operationally important details not captured by the annotations.

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 four focused sentences with the main purpose front-loaded. Each sentence carries useful information: the one-time link, the external upload step, the post-upload handoff, and the size limits.

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?

Given that an output schema exists, the description does not need to explain return values. It covers the full workflow an agent needs: obtain the link, run the upload command externally, respect the exact size and limits, and pass the resulting attachment_id to the appropriate downstream tool.

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 description coverage is 100%, so the input schema already documents email, filename, size, and mime_type thoroughly. The description reinforces the exact-size requirement but does not add meaningful semantics for the other parameters beyond what the schema provides, so the baseline 3 is appropriate.

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: 'Get a one-time link for uploading a file to attach to an email.' It also places the tool in the workflow by saying the resulting attachment_id is passed to add_draft or email_send, which distinguishes it from those sibling tools.

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?

It clearly explains when and how to use the tool: obtain a link, run the returned curl command, then pass attachment_id to add_draft or email_send. It notes the shell/HTTP requirement, but it does not explicitly compare against the sibling stage_attachment_from_email alternative.

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