Skip to main content
Glama

Get a collection's tree

get_collection
Read-onlyDestructive

On one site of the account, named in site. One collection and its pages in tree order: each page, then the pages under it, each level by title. A page has its id, title, slug, status, language, parent_id, depth (1 at the top), level (the name of its depth), public address and, where its level names fields, their values. Narrow it to one language or to the published pages. The ids go to get_post, the writing tools, and add_collection_pages as parent_id.

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": {
      "site": "<site>",
      "collection": "<collection>"
    },
    "name": "get_collection"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesThe site to work on, as list_sites names it
languageNoA BCP 47 tag: only the pages in it
publishedNotrue for the published pages alone, as readers find them
collectionYesIts id, slug or name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations it discloses exactly what comes back per page (id, title, slug, status, language, parent_id, depth, level, public address, level-specific field values) and the traversal order of the tree, which the annotations do not cover. It does not address the annotation set's internal tension — readOnlyHint=true alongside destructiveHint=true — leaving an agent unsure whether any destructive side effect exists, and no pagination or size limits are mentioned.

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?

Information is front-loaded (scope, then contents, then filters, then downstream use) and no sentence is filler. The telegraphic fragments ('On one site of the account, named in site.') and the compressed field list cost some readability without bloating length.

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?

With no output schema, the description carries the return-value burden and does so fully: it enumerates page fields, explains depth/level semantics, and specifies ordering. Combined with the filter behavior and downstream id routing, an agent has everything needed to call it and consume the result.

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 site, language, published, and collection are already documented, and the description largely restates their effects ('named in site', 'Narrow it to one language or to the published pages'). It adds a little meaning by framing those filters as output-narrowing rather than just input types, but supplies no new syntax or format detail.

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?

The description identifies the resource precisely — one collection plus its pages returned in tree order — and scopes it to a single site, so an agent can distinguish it from list_collections (which lists collections) or get_post (which reads one page). The retrieval verb itself is only implied ('One collection and its pages in tree order'), making the opening slightly elliptical rather than a crisp verb+resource statement.

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?

It states clear operational context: use it per-site, narrow with language or published, and feed the returned ids into get_post, the writing tools, or add_collection_pages as parent_id. It never names an alternative to prefer (e.g. list_collections to discover the collection first), so the when-not guidance is absent.

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