diff --git a/src/everything/tools/trigger-elicitation-request-async.ts b/src/everything/tools/trigger-elicitation-request-async.ts index 2de0afb0..f2829299 100644 --- a/src/everything/tools/trigger-elicitation-request-async.ts +++ b/src/everything/tools/trigger-elicitation-request-async.ts @@ -54,9 +54,8 @@ export const registerTriggerElicitationRequestAsyncTool = (server: McpServer) => method: "elicitation/create" as const, params: { task: { - ttl: 600000, // 10 minutes (user input may take a while) - pollInterval: POLL_INTERVAL, - }, + ttl: 600000, // 10 minutes (user input may take a while) + }, message: "Please provide inputs for the following fields (async task demo):", requestedSchema: { type: "object" as const, diff --git a/src/everything/tools/trigger-sampling-request-async.ts b/src/everything/tools/trigger-sampling-request-async.ts index c93cc12e..51ac240f 100644 --- a/src/everything/tools/trigger-sampling-request-async.ts +++ b/src/everything/tools/trigger-sampling-request-async.ts @@ -63,13 +63,12 @@ export const registerTriggerSamplingRequestAsyncTool = (server: McpServer) => { const { prompt, maxTokens } = validatedArgs; // Create the sampling request WITH task metadata - // The _meta.task field signals to the client that this should be executed as a task - const request: CreateMessageRequest & { params: { _meta?: { task: { ttl: number; pollInterval: number } } } } = { + // The params.task field signals to the client that this should be executed as a task + const request: CreateMessageRequest & { params: { task?: { ttl: number } } } = { method: "sampling/createMessage", params: { task: { ttl: 300000, // 5 minutes - pollInterval: POLL_INTERVAL, }, messages: [ {