Skip to main content
Glama
Obsidian MCP Server
by Kynlos

add_table_of_contents

Generate a table of contents from a note's headings, optionally limiting depth, so readers can navigate long Obsidian notes.

Instructions

Generate TOC from headings

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": {
      "filename": "<filename>"
    },
    "name": "add_table_of_contents"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesTarget note
max_depthNoMaximum heading depth

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0

TDQS

C2.5/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and falls well short. It does not disclose that this presumably mutates the target note, where the TOC is placed (top, bottom, replaces an existing TOC), whether existing content is destroyed, or whether the default max_depth is bounded.

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

Conciseness3/5

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

Four words with zero waste and the action front-loaded, which is structurally clean. But the terseness is under-specification rather than genuine concision for a tool that apparently writes into a file.

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

Completeness2/5

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

A file-mutating tool with no annotations, no output schema, and only a four-word description leaves the agent without enough to call it safely or predict its effect. Placement behavior and side effects are the main missing pieces.

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 filename and max_depth are already documented in the schema. The phrase "from headings" weakly ties max_depth to heading levels, but the description adds no default, range, or format information beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Generate TOC from headings" names a specific verb (generate) and resource (TOC), plus the input source (headings), so the core action is inferable. However, it never says whether the TOC is inserted into the target note or merely returned, and nothing distinguishes it from a near-sibling like create_moc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus create_moc or create_dataview_codeblock, no prerequisites stated (e.g., note must already contain headings), and no indication of what happens when the note has no headings.

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

Deploy Server

Other Tools