Skip to main content
Glama

sb_page_state

Read-only

Diagnose a page's draft, published, and session state; detect when the editor canvas will render blank, flag unpublished draft changes, and locate recovery points.

Instructions

Which of this page's three copies is which: the DRAFT the editor canvas shows, the PUBLISHED row the storefront serves, and what this session holds. Says whether the editor will render the canvas BLANK (its hydrate gate discards a document whose root is missing and shows an empty ROOT, silently — the Go renderer has no such gate, which is how "the live page has data but the canvas is empty" happens), whether the draft has changes the live page does not, and where the recovery points are.

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": "sb_page_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
page_idNoDefaults to the open page
site_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.116.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Addedv0.63.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries the real burden and does add non-obvious context: the editor's hydrate gate silently discards documents whose root is missing and renders a blank canvas, while the Go renderer lacks that gate. That explains a confusing symptom an agent would otherwise misdiagnose. It stops short of stating whether the check is cheap, cached, or what fields the report returns.

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

Conciseness3/5

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

The core purpose is front-loaded in the first clause, but the whole thing is a single dense sentence whose long parenthetical about the hydrate gate interrupts the list of what is reported. It reads as prose written for a human reader rather than a scannable spec, and splitting the diagnostic explanation from the report contents would help.

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 no output schema and only two optional parameters, the description does the essential work of enumerating what the report covers: draft vs. published vs. session, draft-divergence status, and recovery points. The remaining gap is site_id's role and the rough shape of the returned report, which leaves the agent guessing on multi-site calls.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%: page_id documents its default ("Defaults to the open page") while site_id is completely undocumented. The description never mentions either parameter or explains when site_id must be supplied, so it fails to compensate for the coverage gap.

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 names the resource (this page's draft, published, and session copies) and the specific question it answers: which copy is which, whether the draft diverges from live, and where recovery points are. It is clearly a read-only diagnostic distinct from mutation siblings like sb_page_update or sb_publish, though it never names an alternative 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 through a vivid diagnostic scenario ("the live page has data but the canvas is empty"), which tells the agent this is the tool to reach for when reconciling draft vs. live state. However, there is no explicit when-to-use instruction, no exclusion, and no named alternative such as sb_page_version for history.

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