Skip to main content
Glama
triliumnext-mcp

triliumnext-mcp

by perfectra1n

Read attachment(s)

get_attachment
Read-only

Read a single attachment by ID or list a note's attachment metadata by note ID. Returns image blocks, text strings, base64 resources, or metadata only for large files.

Instructions

Read one attachment (attachmentId) or list a note's attachments (noteId, metadata only). Bodies come back by type: images as image blocks, text as a string (long text is truncated), other binaries as a base64 embedded resource. Images and binaries over 5 MB return metadata only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteIdNoList this note's attachments (metadata only: attachmentId, title, mime, contentLength).
attachmentIdNoFetch this one attachment (body included unless include_content=false).
include_contentNoWith attachmentId: include the body (default true). Pass false to check mime/size first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.4.0
    • changedInput schema / properties / attachmentId / description
      Previous value: -"If provided, returns the single attachment with this ID (body included by default — pass include_content=false to skip the body)."New value: +"Fetch this one attachment (body included unless include_content=false)."
    • addedInput schema / properties / attachmentId / maxLength
      Added value: +128
    • addedInput schema / properties / attachmentId / minLength
      Added value: +1
    • addedInput schema / properties / attachmentId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
    • changedInput schema / properties / include_content / description
      Previous value: -"Only meaningful with \"attachmentId\". Defaults to true — returns the attachment body: image attachments come back as MCP image blocks, text attachments as raw strings, other binary as base64-wrapped text. Set to false when you specifically need only metadata (e.g., to check size/mime of a potentially large binary before fetching, or for an inventory pass). Otherwise leave at the default — do not pre-emptively set false to \"save tokens\" if you actually need the content."New value: +"With attachmentId: include the body (default true). Pass false to check mime/size first."
    • changedInput schema / properties / noteId / description
      Previous value: -"If provided, returns an array of all attachments for this note. This listing path is metadata-only (title, mime, size, attachmentId) — use it first when you do not yet know which attachment you want."New value: +"List this note's attachments (metadata only: attachmentId, title, mime, contentLength)."
    • addedInput schema / properties / noteId / maxLength
      Added value: +128
    • addedInput schema / properties / noteId / minLength
      Added value: +1
    • addedInput schema / properties / noteId / pattern
      Added value: +"^[A-Za-z0-9_]+$"
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover read-only and closed-world safety; the description goes well beyond them by disclosing per-type return formats (image blocks, truncated strings, base64 embedded resources) and the 5 MB cutoff that degrades to metadata only. These are exactly the behavioral traits an agent needs before calling.

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?

Three tight sentences: mode selection first, then return formats, then the size limitation. No filler and the most decision-relevant information is front-loaded.

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?

Return-value behavior is well covered despite there being no output schema. The gap is that no parameters are required and the description never states what happens if neither noteId nor attachmentId is supplied, nor whether supplying both is valid.

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 100%, so all three parameters are already documented, including the include_content default and the metadata-only listing behavior. The description restates the mode split but adds no format or syntax detail beyond the schema, so baseline 3 is appropriate.

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 and immediately splits the two operating modes by parameter: 'Read one attachment (attachmentId) or list a note's attachments (noteId, metadata only).' An agent can tell this apart from the write siblings (create_attachment, delete_attachment, write_attachment) without opening the schema.

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?

The parameter-to-mode mapping tells the agent which mode to pick, and the include_content hint ('Pass false to check mime/size first') gives a concrete usage pattern. It does not explicitly name alternatives or exclusions (e.g., when to prefer get_note), so it falls short of full routing guidance.

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