Skip to main content
Glama

Observe Webpage State & Interactive Elements

browser_observe
Read-only

Inspect the current webpage DOM and return a compact indexed summary of visible headings, untrusted text, and interactive elements to guide browser actions.

Instructions

Inspect the current webpage DOM and return a compact indexed summary of visible headings, untrusted text, and interactive elements (buttons, links, inputs, selects, checkboxes, radios) for browser_action.

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

Input Schema

NameRequiredDescriptionDefault
task_idNoOptional task ID for execution tracking and cancellation
session_idNoOptional target browser session ID (defaults to active default session)
maxElementsNoMaximum number of interactive elements to index

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds real value beyond that: it is scoped to the current page's DOM, restricted to "visible" elements, and explicitly flags returned text as "untrusted" — a prompt-injection warning the schema and annotations do not carry. It stops short of stating behavior at the element cap or what happens on a page with no visible elements.

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?

One sentence, front-loaded with the action ("Inspect the current webpage DOM") followed by the return shape and the consumer. The element-type list is dense but earns its place by telling the agent exactly which controls are addressable, and there is no redundant restatement of the title or annotations.

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 must carry the return shape, and it does: an indexed, compact summary of visible headings, text and interactive elements. It is near-complete for a three-optional-parameter read tool, but omits truncation behavior when maxElements is hit and does not say the index values are the handles browser_action consumes.

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%, with task_id, session_id and maxElements all documented in the schema itself, so the baseline of 3 applies. The description adds nothing about the parameters — no note that maxElements caps the index (potentially hiding actions) or that omitting session_id targets the default session.

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?

"Inspect the current webpage DOM and return a compact indexed summary" pairs a specific verb with a specific resource, and enumerates the returned content (headings, untrusted text, buttons, links, inputs, selects, checkboxes, radios). The closing "for browser_action" ties it to the sibling it feeds, so an agent can tell it apart from browser_read_page or browser_extract without opening another schema.

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?

The phrase "for browser_action" implies the intended workflow (observe, then act on the returned indices), which is useful context. But there is no explicit when-to-use/when-not guidance and no named alternative for full-text extraction or for the native_chrome_observe path, so the agent must infer the routing.

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