Skip to content

WebMcpTool

Namespace: PuppeteerSharp.Cdp

public class WebMcpTool

Represents a registered WebMCP tool available on the page.

Inheritance: object

View source

public WebMcpAnnotation Annotations { get; init; }

Optional annotations for the tool.

Value: WebMcpAnnotation

View source

public string Description { get; init; }

Tool description.

Value: string

View source

public IFrame Frame { get; init; }

Frame the tool was defined for.

Value: IFrame

View source

public object InputSchema { get; init; }

Schema for the tool’s input parameters.

Value: object

View source

public ConsoleMessageLocation Location { get; init; }

Source location that defined the tool (if available).

Value: ConsoleMessageLocation

View source

public string Name { get; init; }

Tool name.

Value: string

View source

ExecuteAsync(object, WebMcpToolExecuteOptions)

Section titled “ExecuteAsync(object, WebMcpToolExecuteOptions)”
public Task<WebMcpToolCallResult> ExecuteAsync(object input = null, WebMcpToolExecuteOptions options = null)

Executes the tool with the given input parameters.

Parameters

Name Type Description
input object Input object matching the tool’s inputSchema. Defaults to empty object.
options WebMcpToolExecuteOptions Optional execution options, including a cancellation token.

Returns: Task<WebMcpToolCallResult> — A task resolving to the tool call result.

View source

Made with love by Dario Kondratiuk