Skip to main content
Glama

Create an Attachment

create_attachment

A file to send with a request (send_request attachments), up to 100 MB. Give ONE of: size (bytes) — you get a one-time upload_url: PUT the file's exact bytes to it with the given headers, e.g. curl -sf -X PUT -H "content-type: <type>" --data-binary @<file> "<upload_url>" (best for local files); url — Taskriz fetches it (https, public); or content — the file base64-encoded (small files, up to 2 MB). An attachment not sent within a day is deleted.

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": {
      "agent_id": "<agent_id>"
    },
    "name": "create_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoAn https URL Taskriz fetches it from.
nameNoThe file name people see, e.g. "Q3 report.pdf" (from the URL when omitted).
sizeNoIts size in bytes — for an upload link.
typeNoIts MIME type, e.g. application/pdf.
contentNoIts bytes, base64-encoded (up to 2 MB).
agent_idYesThe Agent (from list_agents or create_agent).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only flag non-read-only, non-idempotent, open-world; the description adds genuinely new behavior: a one-time upload_url with the exact PUT recipe and headers, per-mode size ceilings, and a one-day expiry for unsent attachments. That is exactly the operational context annotations cannot express.

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?

Dense but front-loaded: purpose and size cap first, then the mutually exclusive inputs, then the expiry warning. The inline curl example is long but earns its space by encoding required headers, though the opening noun phrase is a weaker lead than a verb-first statement.

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?

Covers the two-step upload flow, delivery constraints, and expiry, which is most of what a 6-parameter mutation tool needs. With no output schema, the description never says what the call returns (attachment id, upload_url field, status), leaving a gap before the agent can chain into send_request.

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 meaning the schema lacks: the three input modes are mutually exclusive (an implicit oneOf) and each mode's fitness for a use case. It does not cover name/type/agent_id, which are left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource (an attachment file) and its consumer (send_request `attachments`) and states a 100 MB ceiling, which distinguishes it from get_attachment. It never states the creating verb explicitly, relying on the tool name, but an agent can still tell what the call produces.

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?

Strong mode-selection guidance: exactly one of size/url/content, with explicit conditions (size for local files, url for public https, content for small files up to 2 MB). It stops short of naming sibling alternatives such as get_attachment for reading an attachment back, but the within-tool routing is unusually clear.

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