Skip to main content
Glama

Focus page element

browser_focus
Idempotent

Focus a semantic or CSS locator on a specific page in a browser session to trigger UI state changes or prepare for a separate key action, keeping the locator scoped to that page.

Instructions

Focus a semantic or CSS locator on one explicitly addressed page without entering a value. Use this for focus-driven UI state or before a separate key action; the locator remains scoped to the supplied sessionId and pageId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
pageIdYes
locatorNo
sessionIdYes
timeoutMsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYes
completedYes
sessionIdYes
operationIdYes
Behavior3/5

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

Annotations already signal readOnlyHint=false, idempotentHint=true, and openWorldHint=true, and the description adds the useful scoping detail that 'the locator remains scoped to the supplied sessionId and pageId.' However, it does not disclose potential side effects implied by the open-world hint (e.g., whether focus changes page state or fires events), so it adds only moderate value beyond annotations.

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?

Two front-loaded sentences with zero waste. The first sentence states the action and its key qualifier ('without entering a value'), and the second provides usage context and scoping. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (frame chains, multiple locator strategies, exact-match options) and the presence of an output schema, the description is functionally adequate. However, the openWorldHint suggests behavioral side effects that go undisclosed, and edge cases like missing elements or visibility requirements are unaddressed, leaving meaningful gaps for a complex tool.

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?

With 0% schema description coverage, the description is expected to compensate, and it partially does by naming sessionId and pageId and clarifying that 'locator' can be semantic or CSS. However, timeoutMs and ref are completely unaddressed, and the locator's frame/strategy options are left to the schema enums, so compensation is meaningful but incomplete.

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 uses a specific verb+resource: 'Focus a semantic or CSS locator on one explicitly addressed page without entering a value.' The qualifier 'without entering a value' clearly distinguishes it from sibling actions like browser_fill or browser_press, and the scoping to sessionId/pageId adds precision. It clearly differentiates from the sibling list where fill/click/observe exist.

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 phrase 'Use this for focus-driven UI state or before a separate key action' provides an explicit when-to-use trigger. However, it does not name specific alternatives or give when-not-to-use exclusions for cases where focus is unnecessary, resulting in good but not fully explicit guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scrollDynasty/BrowserMesh'

If you have feedback or need assistance with the MCP directory API, please join our Discord server