Skip to main content
Glama

Get Attachment

get_attachment
Read-onlyIdempotent

Reads binary attachments from Obsidian vault, returning images inline, audio blocks, or base64 resources. Excludes text files; use dedicated tools for notes or canvases.

Instructions

Read an attachment file and return its bytes to the client. Images come back as image content blocks (rendered inline by Claude / Cursor), audio as audio blocks, everything else as a base64 resource block with a vault:// URI. Caps at 5 MB by default to keep token usage sane; raise via maxBytes up to 50 MB. The attachment must be inside the vault — markdown notes (.md), canvases (.canvas), and Bases (.base) are deliberately rejected so callers don't accidentally pull text-format files through this binary path; use get_note / read_canvas / read_base instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesVault-relative path to the attachment, e.g. 'assets/diagram.png'.
maxBytesNoMaximum file size to fetch in bytes (default: 5,242,880, hard cap: 52,428,800).
Behavior5/5

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

Adds significant detail beyond annotations: default 5MB cap, adjustable up to 50MB, content block types returned, and deliberate rejection of text-format files. No contradiction with readOnlyHint and idempotentHint.

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?

Two sentences, front-loaded with main action, all details earned. No wasted words.

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

Completeness5/5

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

Covers action, return format, constraints, and alternatives. No output schema, but description sufficiently explains what the agent gets back.

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 already fully describes parameters (100% coverage), including default for maxBytes. Description provides context ('to keep token usage sane') but adds minimal new semantic value.

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?

Clearly states it reads an attachment and returns bytes as specific content blocks (image, audio, resource). Explicitly distinguishes from siblings like get_note, read_canvas, read_base by noting it rejects text-format files.

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

Usage Guidelines5/5

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

Provides explicit when-to-use (binary attachments) and when-not-to-use (.md, .canvas, .base files), with alternative tool names. Also states default and max size limits, guiding usage.

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/rps321321/obsidian-mcp-pro'

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