Skip to main content
Glama
doucej

playwright-mcp-server

by doucej

get_html

Retrieve the inner HTML of the first matching element on a web page. Optionally provide a CSS or XPath selector; defaults to the page's body.

Instructions

Return the inner HTML of the first matching element. Defaults to when no selector is provided.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoOptional CSS or XPath selector (default: body).
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It discloses the 'first matching element' behavior and the default, but does not state what happens if no element matches, potential errors, or any side effects. This leaves significant behavioral aspects unknown.

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 a single, front-loaded sentence that communicates the core action and the default behavior. Every word earns its place, with no redundancy or fluff.

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?

For a simple read tool with one optional parameter and no output schema, the description covers the essential behavior. It could mention error handling for no-match scenarios, but given the low complexity and helpful default behavior, it is largely complete.

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?

The schema already documents the selector parameter with its type, optionality, and default (body). The description adds 'first matching element' constraint but this is tool behavior, not parameter semantics. With 100% schema coverage, a score of 3 is the appropriate baseline.

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 function: returning the inner HTML of the first matching element. It distinguishes itself from siblings like get_text and get_attribute by specifying 'inner HTML'. The default to <body> is an additional clarifying scope detail.

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?

It provides context that the selector is optional and defaults to body, which is a usage hint. However, it does not explicitly say when to use this tool instead of alternatives or mention any exclusions, so it stops short of full 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/doucej/playwright-mcp-server'

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