Skip to main content
Glama

Hail Communication for AI

Upload an email attachment

upload_email_attachment

Upload a small attachment for outbound email, as base64 text.

    Meant for small files (under about 50 KB): every base64 character goes
    through the tool call itself. Larger files go through ``create_file_upload``
    with ``purpose="email_attachment"``: its ``curl`` line sends the bytes, and its
    ``id`` works in ``send_email``'s ``attachment_ids``.
    Returns ``id``, ``filename``, ``content_type`` and ``size_bytes``.
    The ID is accepted in an email's ``attachment_ids`` and is reusable across sends.
    Unused uploads expire after 24 hours.
    The combined message and attachments must fit the 25 MB sending limit.

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": {
      "content_base64": "<content_base64>",
      "filename": "<filename>",
      "content_type": "<content_type>"
    },
    "name": "upload_email_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesFile name shown to recipients, such as ``invoice.pdf``.
llm_modelNoModel ID of the calling agent. Optional. Recorded for analytics only.
content_typeYesThe file's MIME type, such as ``application/pdf``.
content_base64YesThe file's bytes, base64-encoded.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Model ID of the calling agent. Optional. Recorded for analytics only.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (which only declare non-read-only, non-idempotent, non-destructive, non-open-world), the description discloses that the upload ID is reusable across sends, that unused uploads expire after 24 hours, and that message plus attachments must fit the 25 MB sending limit. Those are the operational facts an agent actually needs before calling.

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 core action and the size rule, then the alternative, then the return/limit details. Every sentence carries information, though the RST-style double backticks add mild visual noise.

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?

Covers the choice boundary, the alternative path, expiry, the combined size limit, and ID reuse. Listing the return fields is slightly redundant given the output schema exists, but it does no harm and the definition leaves no practical gap for a 4-parameter upload tool.

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 schema already documents filename, content_type, content_base64, and the analytics-only llm_model. The description still adds real meaning by tying content_base64 to a practical size ceiling (~50 KB) because the bytes travel through the tool call, which the schema does not say.

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 opening sentence names a specific verb and resource ('Upload a small attachment for outbound email, as base64 text') and immediately bounds the scope to small, inline base64 payloads. This is enough to separate it from create_file_upload 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 Guidelines5/5

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

It gives an explicit threshold ('under about 50 KB') for choosing this tool and names the alternative for everything larger (create_file_upload with purpose="email_attachment"), including how that path's id feeds send_email's attachment_ids. Both the when and the when-not 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