Skip to content

Commit 1542b65

Browse files
olaservoclaude
andcommitted
fix(everything): move task to params.task and remove pollInterval from requests
- Use params.task instead of params._meta.task for task metadata - Remove pollInterval from task requests (only available on result) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a160653 commit 1542b65

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/everything/tools/trigger-elicitation-request-async.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ export const registerTriggerElicitationRequestAsyncTool = (server: McpServer) =>
5454
method: "elicitation/create" as const,
5555
params: {
5656
task: {
57-
ttl: 600000, // 10 minutes (user input may take a while)
58-
pollInterval: POLL_INTERVAL,
59-
},
57+
ttl: 600000, // 10 minutes (user input may take a while)
58+
},
6059
message: "Please provide inputs for the following fields (async task demo):",
6160
requestedSchema: {
6261
type: "object" as const,

src/everything/tools/trigger-sampling-request-async.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ export const registerTriggerSamplingRequestAsyncTool = (server: McpServer) => {
6363
const { prompt, maxTokens } = validatedArgs;
6464

6565
// Create the sampling request WITH task metadata
66-
// The _meta.task field signals to the client that this should be executed as a task
67-
const request: CreateMessageRequest & { params: { _meta?: { task: { ttl: number; pollInterval: number } } } } = {
66+
// The params.task field signals to the client that this should be executed as a task
67+
const request: CreateMessageRequest & { params: { task?: { ttl: number } } } = {
6868
method: "sampling/createMessage",
6969
params: {
7070
task: {
7171
ttl: 300000, // 5 minutes
72-
pollInterval: POLL_INTERVAL,
7372
},
7473
messages: [
7574
{

0 commit comments

Comments
 (0)