Class Definition
Type Parameters
Properties
Abstract Method
execute(input)
The main execution method that must be implemented.Methods
Response Methods
respond(value)
Set output and end execution immediately.Notification Methods (MCP 2025-11-25)
notify(message, level?)
Send a log message notification to the client.progress(progress, total?, message?)
Send a progress notification to the client.Elicitation Methods
elicit<S>(message, requestedSchema, options?)
Request interactive user input during execution.
Result:
Platform Detection
get platform
Detect the AI platform making the request.'openai' | 'claude' | 'gemini' | 'cursor' | 'continue' | 'cody' | 'generic-mcp' | 'ext-apps' | 'unknown'
get clientInfo
Get client information.History
Entries areHistoryEntry records, not bare values:
inputHistory
History of input changes during execution.outputHistory
History of output changes during execution.Full Example
Related
@Tool
Tool decorator
ExecutionContextBase
Base class
ToolRegistry
Tool registry
Tool Errors
Tool errors