Skip to main content
Glama

Attach a file to a note

attach_file

Attach a file to the note: a photo, a receipt, a PDF, a Markdown or JSON file. Give text for a text file or base64 for anything else, never both. The file gets the next number in the note. At most 10 MB.

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": {
      "id": "<id>",
      "name": "<name>"
    },
    "name": "attach_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe note's id.
nameYesThe file name with its extension, like receipt.jpg or plan.md; the type is read from it unless contentType is given.
textNoThe file's text, for a text file (Markdown, JSON, a list).
base64NoThe file's bytes as base64, for an image or any other file.
contentTypeNoThe MIME type, when the name does not say: image/png, application/json.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses important behavior: text and base64 are mutually exclusive, the attached file receives the next number in the note, and there is a 10 MB size limit. It does not describe permissions, failure modes, or the response, but it adds solid behavioral context for an annotated mutation tool.

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?

The description is three tight sentences, front-loaded with the core action and followed by parameter constraints and limits. Every sentence adds useful information without repetition.

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 simple five-parameter attachment tool with full schema coverage and annotations, the description covers the key invocation constraints and size limit. It could mention the return value or error behavior, but lacks no critical invocation detail.

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 each parameter. The description still adds meaningful semantics by stating that text and base64 must never both be supplied and by clarifying that text is for text files while base64 is for anything else.

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 states a specific verb and resource ('Attach a file to the note') and gives concrete examples of file types. It clearly distinguishes this mutation tool from read-oriented siblings such as read_file and read_note.

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?

Usage of the text/base64 parameters is explained, but there is no explicit guidance on when to use this tool versus alternatives or when not to attach a file. The usage is implied by the tool's narrow purpose.

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