Skip to main content
Glama
obsidian-pkm

obsidian-pkm

by AdrianV101

vault_peek

Inspect a file's metadata and heading outline without reading full content to plan which sections of large notes to read. Returns size, frontmatter, headings with line numbers, and a preview.

Instructions

Inspect a file's metadata and structure without reading full content. Returns file size, frontmatter, a heading outline with each heading's line number and section size, and a brief preview. The outline lists 50 headings at a time; a longer one ends with the outline_offset of the next page. Use this to plan which sections to read from large files. Paths in this tool's output are formatted as markdown links [vault-relative-path.md](obsidian://...) so users can Cmd/Ctrl-click to open in Obsidian. Preserve the link form when relaying paths to the user; pass only the bracket text (e.g. 01-Projects/Foo/note.md) to other vault tools' path arguments, never the full markdown link.

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": {
      "path": "<path>"
    },
    "name": "vault_peek"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath relative to vault root (supports fuzzy resolution: 'devlog' resolves to full path)
outline_offsetNoHow many headings to skip before the 50 the outline lists (default: 0). A whole number below the note's heading count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.0.2
    • addedInput schema / properties / outline_offset
      Added value: +{
      +  "default": 0,
      +  "description": "How many headings to skip before the 50 the outline lists (default: 0). A whole number below the note's heading count.",
      +  "type": "number"
      +}
  2. First observedv3.10.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the load and does well: it discloses return contents, pagination behavior (50 headings per page, next offset in output), and a critical output-format quirk with a warning to strip markdown links before passing paths to other tools. It stops short of stating read-only/safety guarantees explicitly, but the content is rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and returns, then pagination, then the link-handling instruction. Slightly long at six sentences, but nearly every sentence carries actionable information; only the return enumeration could be tightened.

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?

With no output schema, the description must describe returns, and it does so completely, including pagination and output formatting. Nothing an agent needs to call it correctly is missing.

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 baseline is 3; the description adds real meaning by explaining that outline_offset paginates a 50-heading outline and by warning that only the bracket text of an output link should be passed as path. This clarifies usage beyond the schema wording.

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 ("Inspect a file's metadata and structure") plus the key scope qualifier "without reading full content", which distinguishes it from full-content sibling tools like vault_read. It also enumerates exactly what is returned (size, frontmatter, heading outline, preview).

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?

Gives a clear context: "Use this to plan which sections to read from large files." That establishes when the tool beats a full read, though it doesn't explicitly name vault_read as the alternative or state 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.