Skip to main content
Glama

Browser Focus

browser_focus

Use this to focus a specific existing Chromium page element by CSS selector or text before typing. It does not enter content; prefer browser_find for an unknown target.

Input Schema

NameRequiredDescriptionDefault
textNoFor action=type, Unicode text to insert. For non-type element actions without selector/browser_text, visible text may identify the target.
titleNoChoose a page whose title contains this text.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
endpointNoLoopback Chrome DevTools endpoint. Defaults to REMCP_CDP_URL or http://127.0.0.1:9222.
selectorNoCSS selector for the target element; prefer the reusable selector returned by browser_find.
target_idNoPage target id returned by browser_tabs.
timeout_msNoTimeout in milliseconds.
browser_textNoVisible text used only to locate a DOM element; use this instead of overloading text for action=type.
url_containsNoChoose a page whose URL contains this text.

Output Schema

NameRequiredDescriptionDefault
dataNoBrowser element action structured result for browser_action. Stable fields are declared explicitly; platform-specific fields may be added. Large results may return truncated/bytes/preview instead of the full payload.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false, so the agent knows this changes state but is not destructive. The description adds real value by clarifying that focus does not insert content, but it does not say what focusing actually does (keyboard focus vs scroll-into-view) or what happens if the element is absent or ambiguous. Adequate, not rich.

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 tight sentences, front-loaded with the intended action and followed immediately by the exclusion and the redirect to the alternative. Zero filler.

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

Completeness5/5

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

The tool has an output schema and full parameter documentation, so return values and argument meanings are covered elsewhere. What remains the description's job — what the tool does, when to use it, what it does not do, and which sibling to use instead — is all present.

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 description coverage is 100%, so all nine parameters are already documented in the schema, and the description only restates the selector/text targeting choice. Baseline 3 applies since the schema carries the parameter burden; the description adds no syntax, precedence, or targeting-edge-case guidance.

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?

Specific verb (focus) plus a precise resource (a specific existing Chromium page element), with both targeting mechanisms named (CSS selector or text). It also separates itself from the nearest sibling by stating 'prefer browser_find for an unknown target', so an agent can route between them without opening either schema.

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?

Gives a clear use context ('before typing'), an explicit exclusion ('It does not enter content'), and names the alternative for the unknown-target case. It does not address overlap with other element-targeting siblings such as browser_scroll_into_view or browser_click, but the primary ambiguity is resolved.

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