Apply suggestions from code review
Co-authored-by: Cliff Hall <cliff@futurescale.com>
This commit is contained in:
parent
c20c017171
commit
a160653441
2 changed files with 9 additions and 13 deletions
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue