Skip to main content
Glama

webmcp_invoke_tool

Call a page-registered WebMCP tool by name and input to execute its defined actions, alter page state, or trigger network requests.

Instructions

Invokes a WebMCP tool registered by the current web page. Side effects: depends on the tool invoked; may modify page state, trigger network requests, or perform other actions defined by the page. Prerequisites: WebMCP feature must be enabled, target frame must exist, and the tool must be registered. Returns: The output of the tool invocation. Use this to interact with page-provided tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesJSON object string with the input parameters for the page tool (must match its inputSchema). Use "{}" when the tool takes no parameters. Defaults to: "{}".
frameIdYesTarget frame ID where the tool is registered. Constraints: must match a valid frame ID returned by webmcp_list_tools.
toolNameYesName of the WebMCP tool to invoke. Constraints: must match a registered tool name.
instance_idNoChrome instance id from open_instance/list_instances. Omit for the default instance.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv1.3.2
    • removedInput schema / properties / instance_id / nullable
      Removed value: -true
  2. Addedv1.0.11

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses side effects explicitly ('may modify page state, trigger network requests, or perform other actions'), states prerequisites, and returns 'the output of the tool invocation.' This is adequate behavioral disclosure for a generic invoker, though it lacks details like error handling or authentication requirements.

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 three sentences, front-loaded with primary purpose, then side effects, then usage guidance. Every sentence earns its place with no redundancy. It is well-structured and easy to parse.

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?

The tool is a generic invoker, and the description covers prerequisites, side effects, and return value. No output schema exists, but the return is described sufficiently. Missing details like whether the invocation is synchronous or asynchronous are not critical for a generic tool. It is complete enough for an agent to call correctly.

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 the baseline is 3. The description does not add extra meaning beyond the schema's per-parameter explanations. For instance, the input parameter already explains the JSON string format and default '{}'. The description adds no further semantic insight, so it stays at 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 states a clear, specific verb-resource pair: 'Invokes a WebMCP tool registered by the current web page.' This distinguishes it from siblings like webmcp_list_tools (listing) and webmcp_get_invocation (retrieving results). The purpose is unambiguous.

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 description provides prerequisites (WebMCP enabled, frame exists, tool registered) and a general usage statement ('Use this to interact with page-provided tools'). It implicitly points to webmcp_list_tools for frame IDs, but does not explicitly contrast with alternatives like evaluate_js or other invocation methods. Guidance is present but not exhaustive.

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

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/raultov/chrome-debug-mcp'

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