Skip to main content
Glama
pvliesdonk

markdown-vault-mcp

by pvliesdonk

OKF: Generate index.md

okf_generate_index
DestructiveIdempotent

Generate a folder's index.md listing every note with a title link and description pulled from frontmatter. Preserves existing frontmatter and omits reserved files.

Instructions

Generate a reserved OKF index.md listing from the table of contents.

A migration transform (Open Knowledge Format): writes (or overwrites) the folder's index.md as a progressive-disclosure listing — - [title](/path.md) - description per note, description drawn from frontmatter. Existing frontmatter is preserved, so regenerating the bundle-root index.md keeps its okf_version declaration. Reserved files (index.md, log.md) are omitted from the listing. Waits up to 60s for prior index writes; refresh errors abort before generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoVault-relative folder to index (e.g. "guides"). Omit for the bundle root.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description adds meaningful behavioral context: it overwrites index.md, preserves frontmatter, omits reserved files, waits up to 60s for prior writes, and aborts on refresh errors. This goes beyond the annotations and gives an agent a clear model of side effects and failure modes. It does not contradict annotations.

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?

The description is compact and front-loaded: the first sentence states the core purpose, and the following sentences add necessary behavioral details without redundancy. Every sentence earns its place, and the structure is easy to scan.

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?

Given the tool's complexity (a migration transform with overwrite behavior, frontmatter preservation, reserved-file omission, and timeout/error handling), the description covers the key operational aspects. It does not detail the output schema's contents, but an output schema exists, so that is not required. A minor gap is not explicitly stating what happens if the folder does not exist or has no table of contents, but the description is otherwise complete enough for an agent to invoke it correctly.

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 description coverage is 100%, so the schema already documents the 'folder' parameter. The description adds value by explaining that omitting folder targets the bundle root and that the folder is vault-relative. This is useful semantic context beyond the schema's default/description.

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 states a specific verb ('Generate'), a specific resource ('reserved OKF index.md listing'), and the mechanism ('from the table of contents'). It clearly distinguishes this from sibling tools like okf_validate or okf_seed_log by naming the output artifact and the OKF migration-transform context.

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 explains when to use it: to generate or regenerate a folder's index.md, with the folder parameter optional for the bundle root. It does not explicitly name alternatives or say when not to use it, but the context of OKF migration transforms and the explicit 'writes (or overwrites)' behavior gives clear usage context. A small gap is not stating which sibling tool would be used instead for other index operations.

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