Skip to main content
Glama

Pagetool

List a site's sections

list_sections
Read-onlyIdempotent

Lists a site's top-level sections in order - each one's CURRENT index, its stable section_id, its kind, its heading, and its fields (every editable node inside it: heading, body, items[n].title, ... with each node's index and current text) - so you can aim edit_section at exactly the right node with section_id + field. Indices shift whenever an earlier section is removed, so list the sections again after any removal instead of reusing an index you recorded earlier. section_count here is the number of top-level sections listed (the same number as listed_section_count in add_section / edit_section results; their section_count counts every node in the tree). Free, and no account is needed for a draft you created.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_sections"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoWhich page of the site, as its path ("/about", "/contact"). Omit for the home page. See list_pages.
stageNotrue = work on a staged copy instead of the live site: preview it at staged_preview_url, then publish_staged or discard_staged. Omit for a normal (immediately live) edit.
site_keyNoThe site to list. Defaults to the caller's current draft site when omitted.
draft_tokenNoThe draft token returned by draft_create, if you are working on an anonymous draft. Only needed when your client cannot send the x-pagetool-draft-token header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, non-destructive), it discloses the volatile-index behavior ('indices shift whenever an earlier section is removed') and clarifies a confusing count field: section_count here counts top-level sections, whereas add_section/edit_section report listed_section_count plus a separate section_count over the whole tree. It also notes the cost/auth profile ('Free, and no account is needed for a draft you created').

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

Conciseness4/5

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

Front-loaded with the core action and return shape, then the edit_section targeting guidance, then the staleness caveat and count semantics. Dense but largely earned; the nested parenthetical listing every node field ('heading, body, items[n].title, ...') is the wordiest part and could be tightened.

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?

No output schema exists, so the description carries the return-value burden and does so by naming each returned field and its meaning, including the ambiguous count. Combined with 100% schema coverage for inputs and annotations covering the safety profile, an agent has everything needed to call it correctly.

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 all four parameters (page, stage, site_key, draft_token) are documented in the schema with usage notes, so the baseline of 3 applies. The description adds nothing about parameters themselves — its scoping detail is about output fields, not inputs.

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 ('Lists a site's top-level sections in order') and then enumerates exactly what comes back: current index, section_id, kind, heading, and per-node fields with their indices. This is clearly distinguishable from list_pages (pages) and from add_section/edit_section (mutations).

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?

Explicitly routes the agent to its purpose: 'so you can aim edit_section at exactly the right node with section_id + field', naming the sibling that consumes this output. It also gives a concrete when-to-re-call rule: re-list after any removal instead of reusing a recorded index.

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.

Resources