Skip to main content
Glama

attach_file

Upload a file from your project as a chat attachment so the operator can download it. Returns a file ID to reference in your reply.

Instructions

Upload a file from your project as a chat attachment. The path must be inside your current working directory (relative paths are resolved against cwd; symlinks pointing outside are refused). Use this when the operator should be able to download a file you produced. Returns a fileId; mention it in your reply text so the operator can find the chip in the dashboard. Optional targetSessionId lets you upload directly into a different session (e.g. when delivering a file to a peer the channel-token owner has prompter+ on). Without it, the upload goes to the channel's own session — the common case.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file. Relative is resolved against cwd; absolute must still resolve to a path under cwd.
targetSessionIdNoOptional UUID of a different session to upload to. The channel-token's owning user must have prompter+ role on it (owner or shared-as-prompter/approver). Most callers should omit this and let the upload go to the channel's own session.
Behavior4/5

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

With no annotations, the description transparently discloses constraints (path must be under cwd, symlinks refused), return value (fileId), and usage of targetSessionId. It does not cover error cases but is sufficient for safe operation.

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?

The description is front-loaded with the main purpose and each sentence adds value. Slightly verbose but still efficient; no fluff.

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?

Given the tool's simplicity (2 params, no output schema), the description covers path constraints, return value, and optional usage. Minor gap: no error handling details, but adequate for typical use.

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 baseline is 3. The description adds value by clarifying path resolution, security, and optional session targeting beyond the schema descriptions.

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 clearly states the tool uploads a file as a chat attachment, specifies the path constraint, and distinguishes from siblings like read_file or download_to_path.

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 provides clear usage context ('when the operator should be able to download a file you produced') and explains when to use targetSessionId. However, it does not explicitly exclude alternatives or give when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clawborrator/channel_v1'

If you have feedback or need assistance with the MCP directory API, please join our Discord server