Skip to main content
Glama

federated_expand

Walk a remote note's table of contents level by level inside a connected knowledge base (progressive disclosure), same as expand. Canonical call: federated_expand(kb_id=..., path=<result.note_path>, toc_path=[...]). Omit toc_path for the top level, or pass a toc_path to list that node's subsections. A section with subsections lists them; a section without subsections is returned in full, as federated_note_html would return it — has_children on each listed child says where that happens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoNon-negative integer (uint64) remote note id, copied verbatim from a federated_search result's note_id field. Prefer path
hrefNoString remote note href, copied verbatim from a federated_search result's href field
lastNoList only this many of the newest subsections instead of all of them, as expand does. The summary, total_children and omitted say what was left out.
pathNoString remote note path, copied verbatim from a federated_search result's note_path field
firstNoList only this many of the oldest subsections, as expand does.
kb_idYesTarget knowledge base id; nested bases use '/' (e.g. "philosophers/nietzsche" routes through the 'philosophers' peer, recursively). Federation nests up to 3 levels deep (kb_id path segments); a deeper path is rejected.
note_idNoSame remote note id as pid, but as a STRING (uint64) — stringify the federated_search result's note_id field. Prefer path
toc_pathNoBreadcrumb path to the node to expand. Omit or [] for the top level.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / first
      Added value: +{
      +  "description": "List only this many of the oldest subsections, as expand does.",
      +  "type": "number"
      +}
    • addedInput schema / properties / last
      Added value: +{
      +  "description": "List only this many of the newest subsections instead of all of them, as expand does. The summary, total_children and omitted say what was left out.",
      +  "type": "number"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does substantial work: it explains progressive disclosure, that a section with subsections lists them while a leaf section is returned in full 'as federated_note_html would return it', and that has_children signals where recursion ends. It omits any note about permissions, cost, or federation depth limits (the depth cap lives only in the kb_id schema field).

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?

Front-loaded with the core purpose, then the canonical call, then the two branches of toc_path usage. Three dense sentences plus an example, with no filler or restated tautology.

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?

There is no output schema, so the description must explain returns, and it does: it describes listing behavior, leaf-vs-branch outcomes, and the has_children signal, plus first/last truncation context is echoed from the schema. For an 8-parameter recursive traversal tool this is complete enough for correct invocation.

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 the baseline is 3, but the description adds a canonical call signature (kb_id, path, toc_path) that shows how the parameters combine in practice and reinforces that path is the preferred identifier over pid/note_id. That is genuine value beyond the per-field descriptions.

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 ('Walk a remote note's table of contents level by level inside a connected knowledge base') and immediately scopes it against siblings by noting it is 'same as expand' but operating on a connected base rather than locally. An agent can distinguish it from federated_note_html (full content) and expand (local) without opening any schema.

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 explicit conditional guidance for the central parameter: 'Omit toc_path for the top level, or pass a toc_path to list that node's subsections.' It also distinguishes its output from federated_note_html. However it never states when to prefer this over federated_note_html or expand directly, so the routing is implied rather than fully spelled out.

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.