Skip to main content
Glama

expand

Walk a note's table of contents level by level (progressive disclosure). Canonical call: expand(path=<result.note_path>, toc_path=[...]) — copy path verbatim from a search result's note_path field. Returns the direct children of a TOC node: omit toc_path (or pass []) for the top-level sections, or pass a toc_path to list that section's subsections. Each child has title, level, path, and has_children. A section with subsections lists them; a section without subsections is returned in full (what note_html gives for that toc_path, plus section_html in the payload), so no second call is needed to read a leaf. This cannot be turned off, and a client that wants only structure never triggers it: has_children on each listed child says where descending would turn into reading.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoNon-negative integer (uint64) note id, copied verbatim from a search result's note_id field. Not a path, slug, or match_id. Prefer path
hrefNoString note href, copied verbatim from a search result's href field
pathNoString note path, e.g. "concepts/maska-i-glubina.md" — copy verbatim from a search result's note_path field. The default, preferred way to reference a note
note_idNoSame as pid: non-negative integer (uint64) note id, copied verbatim from a search result's note_id field. Not a path, slug, or match_id. Prefer path
toc_pathNoBreadcrumb path to the node to expand, e.g. ["Chapter 1"]. Omit or [] for the top level.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Since no annotations are present, the description carries full behavioral burden. It clearly discloses progressive-disclosure semantics, the leaf-section full-content behavior with section_html, and the 'cannot be turned off' nuance with has_children as the guide to avoid unintended reads. This is exactly the behavioral detail an agent needs.

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 dense but every sentence earns its place: purpose, canonical call, return shape, leaf behavior, and the has_children guard. It is front-loaded with the purpose and invocation pattern.

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?

For a tool with five parameters, zero required, no output schema, and no annotations, the description explains the return fields, handles the optional toc_path cases, and addresses the leaf-versus-structure edge case. Nothing critical for correct invocation is missing.

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%, and the schema already states the 'copy verbatim' rule and 'prefer path' for the identifier parameters. The description adds a canonical call pattern and clarifies toc_path usage, but does not introduce fundamentally new parameter semantics beyond the schema. Hence the baseline score of 3 is appropriate.

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 ('walk') and resource ('a note's table of contents') and describes the progressive-disclosure behavior. The return behavior (direct children of a TOC node) clearly distinguishes it from siblings like note_html (rendered content) and search (finding notes).

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

Usage Guidelines5/5

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

Provides a canonical call template, instructs to copy path verbatim from a search result's note_path, and explicitly explains when to omit toc_path (top level) vs pass it (subsection). It also tells clients how to avoid triggering full leaf reads via has_children, and contrast with note_html's output.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.5/5.0
Disambiguation4/5

The local/federated pairs are clearly separated by the federated_ prefix, and search, note_html, expand, and similar each have distinct roles. The main ambiguity is between instructions and wiki, which both sound like meta-instruction tools, and expand's documented leaf-reading overlap with note_html is a minor edge case.

Naming Consistency4/5

Tool names are uniformly snake_case and the federated_ prefix creates a strong, predictable pattern across local and remote counterparts. However, base names mix verbs (search, expand), nouns (instructions, wiki), a format-ish noun (note_html), and an adjective used as a command (similar), so the pattern is not fully verb_noun.

Tool Count5/5

11 tools is a well-scoped size for a read-oriented knowledge base with both local and federated access. Each tool maps to a clear workflow stage—search, read, navigate, find similar, or fetch instructions—without significant redundancy or bloat.

Completeness4/5

The tool surface covers search, reading, structural navigation, similar-note discovery, and federated equivalents, plus base instructions, which supports the core retrieval workflow end to end. The notable gap is the lack of a way to enumerate or browse all notes in a corpus without already having a query or path, though agents can work around this via search and instructions.