Skip to main content
Glama

Query pages

query_pages
Read-onlyIdempotent

Query Page summaries, with a body preview, in one workspace. By default it returns root Pages; includeSubPages returns Pages at every depth, parentId returns one Page's direct children, and sort orders the results. viewId runs a saved View instead; only workspaceId, limit, cursor, calendar, today, and timeZone may accompany it. Calendar scopes use the View's dateProperty: scheduled takes inclusive start/end dates (at most 42 days) and returns Pages whose span, through endDateProperty when set, overlaps them; unscheduled returns unset values, incompatible returns non-date values. Each scope pages separately with nextCursor. A batch too large for one response returns fewer Pages than limit, with nextCursor for the rest. PAGINATION_RESTART_REQUIRED means the cursor no longer applies and the query starts over without it.

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": {
      "workspaceId": "<workspaceId>"
    },
    "name": "query_pages"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNo
sortNoOrder results by title, createdAt, updatedAt, position (sub-page order), a typed property, or when a property changed. Omit for the default order.
limitNo
todayNoThe user's local date as YYYY-MM-DD, used to resolve relativeDate filter values. Defaults to today in timeZone, or the current UTC date.
cursorNo
filterNoNested AND/OR expression over Pages at every hierarchy depth. Use parent conditions to constrain hierarchy explicitly.
searchNo
typeIdNoFilter by one Page Type ID, use null for Pages without a Type, or omit for any Type.
viewIdNo
calendarNo
parentIdNoUse null for root Pages or provide a Page ID for its direct children, ordered by position. Omit when includeSubPages is true.
timeZoneNoThe user's IANA time zone, such as Europe/Rome, which decides the local date a property changed on for changed filters. Defaults to UTC.
workspaceIdYes
deletionFilterNo
propertyEqualsNoRequire every supplied property to exactly match its typed value. List values must match completely, including item order.
includeSubPagesNoOpt in to all Pages, including nested sub-pages, ordered by most recently updated, or by best title match when searching. Omit for ordinary list Pages requests so only root Pages are returned.
propertyContainsNoRequire every supplied list property to contain all requested items. List item order does not matter.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already establish readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. Beyond that the description adds genuinely useful runtime semantics: partial batches return fewer than limit with nextCursor, each calendar scope pages separately, and PAGINATION_RESTART_REQUIRED means the query restarts without the cursor. It does not cover permission requirements or ordering of results when no sort is given.

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?

A single dense paragraph that front-loads the core behavior and then walks mode by mode. Every sentence carries information an agent needs, and the ordering mirrors the decision sequence an agent would follow.

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?

An output schema exists, so return shape does not need explanation, and the description is otherwise substantial for a 17-parameter query tool. The remaining gap is that the filtering surface (filter, search, typeId, propertyEquals/Contains) — arguably the largest part of the schema — gets no mention here.

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 description coverage is 53% across 17 parameters, so the description must carry weight, and it does for the highest-risk ones: includeSubPages, parentId, sort, viewId's strict parameter allowlist, the 42-day scheduled span, and the cursor reset contract. It stays silent on ids, filter, search, typeId, deletionFilter, propertyEquals and propertyContains, leaving those entirely to the schema's own nested descriptions.

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 opens with a specific verb and resource ('Query Page summaries, with a body preview, in one workspace') and immediately scopes it to a single workspace. It never names a sibling such as read_pages or show_pages, so the agent must infer the boundary from behavior alone rather than being routed explicitly.

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 gives clear mode-selection guidance: default returns root Pages, includeSubPages returns all depths, parentId returns direct children, viewId runs a saved View, and calendar modes handle scheduled/unscheduled/incompatible. What is missing is an explicit statement of when to choose this tool over the sibling read/show/list tools, and the mutual exclusivity of viewId with filter-style params is only partly 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.

Resources