Skip to main content
Glama

Get Page Tree

get_page_tree
Read-only

Fetches a space's page tree or a subtree under a given page in one call, honoring depth and page limits and listing unexpanded pages for follow-up.

Instructions

The page tree of a space, or of one page, several levels deep in one call. The walk stops at max_depth levels or max_pages pages; pages whose children were not read are listed in not_expanded, and get_page_tree with that page as root_page_id continues there.

Input Schema

NameRequiredDescriptionDefault
space_idYesSpace id from list_spaces.
max_depthNoLevels to walk down.
max_pagesNoStop after listing this many pages.
root_page_idNoStart below this page instead of the space's top.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, closed-world), so the description's real contribution is truncation behavior: the walk stops at max_depth/max_pages, unread children are reported in not_expanded, and re-calling with that page as root_page_id resumes. That is exactly the non-obvious behavior 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?

Two sentences, no waste, and the scope statement is front-loaded ahead of the truncation/resume mechanics. Every clause carries actionable information.

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?

With an output schema present, the description needn't enumerate return fields, and pointing at not_expanded ties the traversal semantics to the response. It stops short of noting ordering or what the root-level entries represent, but nothing required to call it correctly is missing.

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 semantics the schema lacks: which parameter pair causes truncation and how root_page_id acts as a continuation cursor into the not_expanded set rather than just 'start here'.

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

Purpose4/5

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

States a specific verb+resource: 'The page tree of a space, or of one page, several levels deep in one call.' That distinguishes it from flat listing siblings like list_pages and from single-page readers like get_page, though it doesn't name a sibling explicitly.

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?

Usage is implied by the description (use it when you need a multi-level subtree in one call, or to continue from a truncated page), but no alternative is named and no when-not-to-use guidance is given relative to list_pages or get_page_outline.

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