Skip to content

toolmark-monorepo / @toolmark/core/webmcp / WebMcpToolDescriptor

Interface: WebMcpToolDescriptor ​

Defined in: packages/core/src/webmcp/model-context.ts:32

Experimental

The tool descriptor handed to ModelContext.registerTool. WebMCP is an origin-trial API; this adapter is outside semver (D28).

Properties ​

annotations? ​

optional annotations?: WebMcpToolAnnotations

Defined in: packages/core/src/webmcp/model-context.ts:42

Experimental

Behaviour annotations.


description ​

description: string

Defined in: packages/core/src/webmcp/model-context.ts:38

Experimental

Natural-language description.


inputSchema? ​

optional inputSchema?: object

Defined in: packages/core/src/webmcp/model-context.ts:40

Experimental

Input JSON Schema.


name ​

name: string

Defined in: packages/core/src/webmcp/model-context.ts:34

Experimental

Tool name (1–128 characters: ASCII alphanumerics, _, -, .).


title? ​

optional title?: string

Defined in: packages/core/src/webmcp/model-context.ts:36

Experimental

Human-readable title.

Methods ​

execute() ​

execute(input, options?): Promise<unknown>

Defined in: packages/core/src/webmcp/model-context.ts:48

Experimental

Runs the tool. Resolves the result object; the browser or polyfill serializes it once.

Parameters ​

input ​

unknown

The input object (a JSON string is also accepted).

options? ​

WebMcpExecuteOptions

Execution options (absent under the polyfill).

Returns ​

Promise<unknown>