Skip to main content
Glama

Attach a file to a task

taskthread_attach_file

Attach a file to a task: a text or Markdown file you write (pass text), or an image, PDF, Word or PowerPoint file (pass contentBase64 and mimeType), up to 5 MB. It shows in the task's attachments in the app, and the task history says you added it.

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": {
      "taskId": "<taskId>",
      "name": "<name>"
    },
    "name": "taskthread_attach_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFile name with extension, e.g. "launch-plan.md".
textNo
taskIdYes
mimeTypeNo
contentBase64No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and non-idempotent, and the description adds real behavioral context beyond them: a 5 MB cap, that the file becomes visible in the task's attachments in the app, and that an entry is written to task history. It stops short of covering what happens on name collisions or oversize rejection, which matters given idempotentHint=false.

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?

A single dense sentence where every clause earns its place: the verb, the two input modes, the size limit, the app-visible result, and the history side effect. Front-loaded with the action and free of boilerplate.

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 five-parameter mutation tool with no output schema and no annotations covering limits, the description supplies the essentials an agent needs: payload mode selection, size ceiling, and observable outcome. Missing are error/failure semantics (oversize, invalid mimeType, duplicate name) and any indication of what the call returns, such as an attachment identifier.

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?

With only 20% schema coverage (only `name` is documented), the description carries the load and does so well: it explains that `text` and `contentBase64`+`mimeType` are mutually exclusive input modes chosen by file type, and the 5 MB limit bounds the text payload. It leaves `taskId` and the exact `mimeType` format unaddressed, and does not say what happens if both `text` and `contentBase64` are supplied.

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?

States a specific verb and resource ('Attach a file to a task') and then branches into the two concrete modes: a written text/Markdown file via `text`, or a binary file via `contentBase64` plus `mimeType`. It is clearly not a read/list tool, so it is distinguishable from siblings like taskthread_read_attachment or taskthread_list_attachments, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description gives useful routing guidance between the two input modes by file type, which is effectively when-to-use-this-parameter guidance. It does not say when to prefer this tool over alternatives (e.g., checking existing attachments first with taskthread_list_attachments) or what to do if the file is too large, so usage context is implied rather than explicit.

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