Summary
The Stagehand tool definitions don't include MCP annotations (readOnlyHint, destructiveHint, idempotentHint). These are optional hints in the MCP spec that help LLMs decide how to handle tools safely.
Suggested annotations
| Tool |
Suggested annotation |
Reason |
browserbase_stagehand_observe |
readOnlyHint: true |
Inspects page, no side effects |
browserbase_stagehand_screenshot |
readOnlyHint: true |
Captures state, no side effects |
browserbase_stagehand_extract |
readOnlyHint: true |
Extracts data, doesn't modify page |
browserbase_stagehand_navigate |
idempotentHint: true |
Same URL = same result |
browserbase_stagehand_act |
destructiveHint: false |
Interacts with page but typically not data-destructive |
Example
In src/tools/observe.ts:
const observeSchema: ToolSchema<typeof ObserveInputSchema> = {
name: "browserbase_stagehand_observe",
description: "Observe the current page and return a list of actionable elements.",
annotations: {
readOnlyHint: true,
},
inputSchema: ObserveInputSchema,
};
Context
I ran a benchmark of tool definition quality across popular MCP servers. This server scores 94/100 (A grade) — the basics are solid. The main gap is missing annotations. Servers like Exa and Kubernetes MCP use annotations extensively.
Full benchmark: https://wildrunai.com/blog/mcp-quality-benchmark
Validation tool: https://wildrunai.com/tools/mcp-validator
Summary
The Stagehand tool definitions don't include MCP annotations (
readOnlyHint,destructiveHint,idempotentHint). These are optional hints in the MCP spec that help LLMs decide how to handle tools safely.Suggested annotations
browserbase_stagehand_observereadOnlyHint: truebrowserbase_stagehand_screenshotreadOnlyHint: truebrowserbase_stagehand_extractreadOnlyHint: truebrowserbase_stagehand_navigateidempotentHint: truebrowserbase_stagehand_actdestructiveHint: falseExample
In
src/tools/observe.ts:Context
I ran a benchmark of tool definition quality across popular MCP servers. This server scores 94/100 (A grade) — the basics are solid. The main gap is missing annotations. Servers like Exa and Kubernetes MCP use annotations extensively.
Full benchmark: https://wildrunai.com/blog/mcp-quality-benchmark
Validation tool: https://wildrunai.com/tools/mcp-validator