Skip to main content
Glama
pvliesdonk

markdown-vault-mcp

by pvliesdonk

Table of Contents

get_toc
Read-onlyIdempotent

Retrieve a structured heading outline for a note or folder subtree in a Markdown vault. Use it to see the TOC of a note or aggregate headings across all notes under a folder.

Instructions

Heading outline for a single note or a whole folder subtree.

If 'path' ends in '.md' it is a note: returns a flat ordered list of {heading, level} (the title as a synthetic H1). Otherwise 'path' is a folder: returns {path, notes, truncated} where 'notes' is an ordered list of {path, title, headings} aggregating every note under the subtree. Mirrors the 'toc://vault/{path}' resource, adding the max_level / max_notes controls below.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesNote path ("a/b.md") or folder prefix ("a/b").
max_levelNoDrop headings deeper than this level (e.g. 2 keeps H1-H2); must be >= 1. The synthetic H1 title always survives. Default None returns all levels.
max_notesNoFolder mode only — cap on distinct notes (default 200, must be >= 1). When more notes match, the first max_notes (by path) are returned and 'truncated' is True.
wait_for_pending_writesNoWait for recent index writes. On timeout, answer from the current index with _meta.index_stale=true. Default false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv5.0.0
    • changedInput schema / properties / wait_for_pending_writes / description
      Previous value: -"When True, wait until recent\ndocument mutations are applied to the index\nbefore answering. Default False answers from the current\nindex; inspect '_meta.index_stale' to tell whether a write was\nstill in flight. Bounded by a server timeout (default 60s)."New value: +"Wait for recent index writes. On timeout, answer from the current index with _meta.index_stale=true. Default false."
  2. Changed1 schema field changedv4.0.0
    • changedInput schema / properties / wait_for_pending_writes / description
      Previous value: -"When True, wait until recent\nwrite/edit/delete/rename operations are applied to the index\nbefore answering. Default False answers from the current\nindex; inspect '_meta.index_stale' to tell whether a write was\nstill in flight. Bounded by a server timeout (default 60s)."New value: +"When True, wait until recent\ndocument mutations are applied to the index\nbefore answering. Default False answers from the current\nindex; inspect '_meta.index_stale' to tell whether a write was\nstill in flight. Bounded by a server timeout (default 60s)."
  3. First observedv3.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety bar is lower. The description adds real behavioral value beyond that: the conditional return shape per path type, the synthetic H1 title, the ordered aggregation of notes in folder mode, and the mirroring of the toc:// resource with added controls. It does not go into truncation/staleness behavior, but the schema documents those.

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?

The description is well-structured: a one-sentence summary up front, then mode-specific behavior, then the resource mirroring note. Each sentence earns its place and the most decision-relevant fact (note vs folder behavior) is front-loaded. It is slightly verbose in recounting return shapes that the output schema already captures, which keeps it from a 5.

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?

Given the tool's complexity — two output modes, four parameters, an existing output schema, and full schema-provided parameter descriptions — the description covers the mode-switching semantics, the synthetic H1 behavior, and the relationship to the toc:// resource. Nothing an agent needs to call it correctly is missing, and the description does not need to repeat return values because an output schema exists.

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 description coverage is 100%, so the baseline is 3 and the schema carries the full detail on max_level, max_notes, and wait_for_pending_writes. The description adds marginal semantics by explaining how 'path' determines mode (”.md" suffix → note vs folder prefix) and by naming the controls, but stops short of enriching the parameters' meaning beyond that.

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 opening sentence 'Heading outline for a single note or a whole folder subtree' names a specific resource and purpose, and the description immediately distinguishes two modes by path type ('If 'path' ends in '.md' it is a note... Otherwise 'path' is a folder'). This cleanly separates it from sibling read/navigation tools like read, search, and browse_vault.

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 description gives strong operational guidance on mode selection (note vs folder based on path suffix) and connects the tool to the 'toc://vault/{path}' resource. However, it never explicitly tells the agent when to prefer this over siblings such as read, list_documents, or search, nor states any when-not conditions, so the usage context against alternatives is only implied.

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