basalt / mcp-core/src / ToolInvokeContext
Interface: ToolInvokeContext
Defined in: mcp-core/src/server.ts:35
Per-invocation context handed to a tool. signal aborts on client cancellation; progress streams updates back to the client; elicit asks the client a yes/no question (only present when the transport wired it up — over stdio, when the client announced the elicitation capability); headers carries opaque per-call transport metadata (e.g. HTTP headers) forwarded verbatim; remoteAddress is the transport peer's address, when known.
Properties
elicit?
> optional elicit?: (prompt) => Promise<boolean>
Defined in: mcp-core/src/server.ts:38
Parameters
prompt
string
Returns
Promise<boolean>
headers?
> optional headers?: Record<string, string | string[] | undefined>
Defined in: mcp-core/src/server.ts:39
progress?
> optional progress?: (update) => void
Defined in: mcp-core/src/server.ts:37
Parameters
update
Returns
void
remoteAddress?
> optional remoteAddress?: string
Defined in: mcp-core/src/server.ts:40
signal
> signal: AbortSignal
Defined in: mcp-core/src/server.ts:36