Skip to main content
Glama
Yan-Vi
by Yan-Vi

get_page_object

Retrieve a page object's locators and scopes. Specify the page object name and optionally a project path.

Instructions

Get a page object's locators and scopes. selector is a Playwright locator-chain EXPRESSION -- the text that goes after "page." (or the scope's own expression, for a scoped one), e.g. "getByRole('button', { name: 'Submit' })" or "locator('#submit')" -- never a bare selector-engine string on its own. Each shows its inferred parameters (from ${...} inside one of the expression's own string-literal arguments, see extractPoParams) alongside the raw expression. A locator with a scope field is nested under that named scope (see the scopes map) -- its own expression only needs to be unique within the scope's subtree, not the whole page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
projectNoPath to the project root (same folder the side panel connects to). Defaults to the EASYSPEC_PROJECT environment variable if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

B3.4/5.0
Behavior3/5

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

Annotations are absent, so the description carries the full burden. It discloses the semantics of the locator expression, inferred parameters, and scoping behavior, which goes beyond a generic 'get' statement. However, it does not explicitly state read-only nature, permissions, or side effects (if any). The name implies a read operation, but the description does not confirm it.

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?

The description is dense but well-structured, front-loading the core purpose before diving into technical details. The examples and clarifications are relevant and earn their place, though it is longer than strictly necessary for a simple get operation.

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, the description compensates by explaining the return structure: locators with inferred parameters, raw expressions, and scoping rules. It also references 'extractPoParams' and the scopes map, giving the agent enough context to interpret results. It does not cover error cases or pagination, but for a single-object retrieval tool, it is reasonably complete.

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 description coverage is 50% (only 'project' has a description). The description does not explain the 'name' parameter at all; it focuses on the output's selector expression, which is not a parameter. It adds no clarity on what 'name' should be or how to format it, leaving the agent to infer from the tool name and context.

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?

The description clearly states the tool gets a page object's locators and scopes, with a specific verb and resource. It explains the selector expression format with examples, which distinguishes it from list_page_objects (which lists all) and create/delete operations. The purpose is unambiguous and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides detailed guidance on interpreting the selector expression and scopes, but it never explicitly states when to use this tool versus alternatives like list_page_objects. An agent must infer from context that this is for retrieving details of a single page object; no exclusions or alternative recommendations are given.

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