Skip to main content
Glama

read_attachment

Read-onlyIdempotent

Open vault attachments to view images, read text files, or retrieve metadata and base64 data for other file types.

Instructions

Open an attachment: images come back as an image you can see, text files as text, other files as metadata (or base64 with as_base64).

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": {
      "file": "<file>"
    },
    "name": "read_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYes
vaultNoVault name, id or folder path (see list_vaults). Default: OBSIDIAN_VAULT or the vault open in Obsidian.
as_base64No
max_bytesNoDefault 8 MB

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuinely new behavioral context: the response shape differs by MIME type (image, text, metadata) and base64 is opt-in via as_base64. It omits what happens when a file exceeds max_bytes, which is the main remaining behavioral unknown.

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 compact sentence that front-loads the action and then enumerates outcomes in a natural order (image, text, other) with the opt-in flag parenthesized at the end. No filler, no repetition of the tool name.

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?

With no output schema, the description carries the return-value burden and does so by classifying responses per file type, which is the key thing an agent needs. It is nearly complete for a 4-param read tool; the gaps are the unspecified 'file' path convention and size-limit behavior rather than the core contract.

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 50%, and the description compensates for exactly one gap by explaining as_base64 and its relationship to the metadata fallback. It says nothing about the required 'file' parameter (path vs filename vs relative-to-vault) or about max_bytes truncation behavior, leaving half the surface to inference.

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 ('Open an attachment') and immediately characterizes what comes back for each file class. It is clearly distinguishable from note/block readers in the sibling list, 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 implied context is 'use this to read an attachment file rather than a note', and the as_base64 mention hints at a fallback path when metadata is not enough. However there is no explicit when-to-use/when-not statement, no mention of add_attachment as the write counterpart, and no guidance on choosing between this and the note-reading tools.

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

Deploy Server

Other Tools