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

set_method_scope

Assign a locator to a page object's scope so generated code reads it from that scope's element instead of the whole page. Pass an empty scope to unassign and revert to page-wide.

Instructions

Nest an existing locator under one of its OWN page object's scopes (create the scope first with set_scope) -- generated code then reads it off that scope's own element instead of the whole page. Omit/pass an empty scope to unassign, going back to page-wide.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

A4.2/5.0
Behavior4/5

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

There are no annotations, so the description carries the full burden. It explains the behavioral impact on generated code (reads off the scope's element instead of the whole page) and the unassign behavior. It does not mention potential errors or side effects like overwriting an existing scope, but the core behavior is disclosed.

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?

The description is concise and information-dense, delivering the core action, usage prerequisite, and unassignment behavior in two sentences with no unnecessary words.

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?

The description is self-contained for the tool's main purpose, explaining prerequisite, fallback behavior, and effect on generated code. Since there is no output schema, return values are not a gap. Minor details like error handling or overwrite semantics are not covered but are not essential for correct invocation.

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 only 25%, with only project described. The description adds meaning for scope (optional, empty means unassign) and method (existing locator), and implies pageObject's ownership, but does not explicitly describe pageObject or project beyond the schema. It partially compensates for the low schema coverage but not fully.

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's purpose: nesting an existing locator under a scope within its page object, with the alternative of unassigning by omitting or passing an empty scope. It also distinguishes itself from the related set_scope tool by explicitly referring to it as the prerequisite.

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?

The description provides direct usage guidance: create the scope first with set_scope, and omit or pass an empty scope to unassign. It could be more explicit about when not to use this tool versus alternatives like remove_scope, but the main usage patterns are clear.

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