Apply suggestions from code review

Co-authored-by: Cliff Hall <cliff@futurescale.com>
This commit is contained in:
Ola Hungerford 2026-01-21 17:55:10 -07:00 • committed by GitHub
commit a160653441
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 13 deletions

View file

@ -53,6 +53,10 @@ export const registerTriggerElicitationRequestAsyncTool = (server: McpServer) =>
const request = {
method: "elicitation/create" as const,
params: {
task: {
ttl: 600000, // 10 minutes (user input may take a while)
pollInterval: POLL_INTERVAL,
},
message: "Please provide inputs for the following fields (async task demo):",
requestedSchema: {
type: "object" as const,
@ -76,12 +80,6 @@ export const registerTriggerElicitationRequestAsyncTool = (server: McpServer) =>
},
required: ["name"],
},
_meta: {
task: {
ttl: 600000, // 10 minutes (user input may take a while)
pollInterval: POLL_INTERVAL,
},
},
},
};

View file

@ -67,6 +67,10 @@ export const registerTriggerSamplingRequestAsyncTool = (server: McpServer) => {
const request: CreateMessageRequest & { params: { _meta?: { task: { ttl: number; pollInterval: number } } } } = {
method: "sampling/createMessage",
params: {
task: {
ttl: 300000, // 5 minutes
pollInterval: POLL_INTERVAL,
},
messages: [
{
role: "user",
@ -79,12 +83,6 @@ export const registerTriggerSamplingRequestAsyncTool = (server: McpServer) => {
systemPrompt: "You are a helpful test server.",
maxTokens,
temperature: 0.7,
_meta: {
task: {
ttl: 300000, // 5 minutes
pollInterval: POLL_INTERVAL,
},
},
},
};