Skip to main content
Glama
jagoff

obsidian-mcp-complete

by jagoff

obsidian_list_attachments

Read-only

List non-Markdown files such as images, PDFs, and audio from an Obsidian vault. Filter by folder or extension to manage embedded assets.

Instructions

List non-Markdown files, useful for images, PDFs, audio, and other embedded assets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vaultNoOptional configured vault name. Defaults to the server default vault.
folderNo.
extensionNo
limitNo

Implementation Reference

  • Schema/registration for the obsidian_list_attachments tool. Defines input parameters: vault, folder, extension, limit.
    "obsidian_list_attachments",
    "List non-Markdown files, useful for images, PDFs, audio, and other embedded assets.",
    {
      vault: vaultArg,
      folder: z.string().optional().default("."),
      extension: z.string().optional(),
      limit: z.number().int().min(1).max(5000).optional().default(1000),
    },
  • Handler for obsidian_list_attachments. Lists non-Markdown files (filters out .md and .markdown extensions) in a vault folder, optionally filtered by extension.
      async (args) => {
        const entries = (await vaults.listEntries(args.vault, { folder: args.folder, recursive: true, extension: args.extension, includeDirectories: false }))
          .filter((entry) => ![".md", ".markdown"].includes(entry.extension.toLowerCase()));
        return { total: entries.length, attachments: entries.slice(0, args.limit) };
      },
      { readOnlyHint: true },
    );
  • src/tools.ts:1031-1046 (registration)
    Registration of the obsidian_list_attachments tool via the internal 'tool' helper function which wraps server.tool() with annotations. Tools are registered inside registerObsidianTools().
    tool(
      "obsidian_list_attachments",
      "List non-Markdown files, useful for images, PDFs, audio, and other embedded assets.",
      {
        vault: vaultArg,
        folder: z.string().optional().default("."),
        extension: z.string().optional(),
        limit: z.number().int().min(1).max(5000).optional().default(1000),
      },
      async (args) => {
        const entries = (await vaults.listEntries(args.vault, { folder: args.folder, recursive: true, extension: args.extension, includeDirectories: false }))
          .filter((entry) => ![".md", ".markdown"].includes(entry.extension.toLowerCase()));
        return { total: entries.length, attachments: entries.slice(0, args.limit) };
      },
      { readOnlyHint: true },
    );
Behavior3/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, so the description adds no further behavioral context. It accurately reflects the safe read-only nature but lacks details like error handling or indexing behavior.

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 sentence of 12 words is extremely concise and front-loaded, conveying the essential purpose without unnecessary content.

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

Completeness3/5

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

The description is minimal; it does not explain the return format, how results are ordered, or how parameters like extension filter files. Given no output schema, more detail on the output would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 25%, and the description provides no additional information about parameters like vault, folder, extension, or limit. This fails to compensate for the low coverage.

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 lists non-Markdown files, providing examples (images, PDFs, audio) and differentiating it from siblings like obsidian_list_files which likely lists all files.

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 description implies usage for non-Markdown assets but does not explicitly provide context on when to use this tool versus alternatives or when not to use it.

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

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