Skip to main content
Glama

attach_file

Attach a base64-encoded file to a task to satisfy review gates: uploading a .md file clears the RESEARCH_REPORT_REQUIRED refusal on Research tasks.

Instructions

Attach a file to a task (content as base64). A filename ending in .md is what satisfies the research-report gate: a type:"Research" task is refused review with RESEARCH_REPORT_REQUIRED until a .md is attached, so attaching the report is how to recover from that refusal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTask id — a full id, or any unique prefix of one, of the task to attach to. An id that matches nothing is refused with TASK_NOT_FOUND; no file is written.
dryRunNo
filenameYesBare filename, no directory part. The EXTENSION decides acceptance: a .md is what satisfies the research-report gate, and an unsupported extension is refused with UNSUPPORTED_FILE_TYPE.
contentB64YesThe file content, base64-encoded (not raw bytes, and not a path to read). Required: omitting it is refused by input validation before the tool runs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-idempotent, non-destructive write, and the description adds useful state-behavior context about the research gate refusal. However it says nothing about whether re-attaching the same filename overwrites, duplicates, or is refused — a real gap given idempotentHint=false and destructiveHint=false are the only signals on that front.

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?

Two sentences with the core action front-loaded and the gate mechanics second; nothing is padded. The second sentence is dense and clause-heavy, but each clause carries actionable information about the failure/recovery loop.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the primary workflow and the research-gate recovery well, and there is no output schema to explain. But `dryRun` — a fourth parameter documented nowhere in the schema either — is never mentioned, so an agent cannot learn from the definition that a preview mode exists. That leaves a meaningful hole for a mutation 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 coverage is 75% and the three documented parameters already carry rich descriptions with their refusal codes (TASK_NOT_FOUND, UNSUPPORTED_FILE_TYPE, input validation). The description merely restates the base64 and `.md` facts already in the schema and adds no new parameter meaning, so the baseline 3 applies.

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?

States a specific verb and resource ('Attach a file to a task') plus the key encoding contract (base64), which is exactly what an agent needs to know before calling. No sibling tool attaches files, so there is no ambiguity to resolve; the definition is self-distinguishing.

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?

Gives a concrete when-to-use scenario: attaching a `.md` is the recovery path for a `type:"Research"` task blocked with RESEARCH_REPORT_REQUIRED. That is clear triggering context. It stops short of explicit when-not guidance (e.g. whether non-.md attachments are ever useful), so it lands at 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.