mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-22 05:45:15 +02:00
Apply suggestions from code review
Co-authored-by: Cliff Hall <cliff@futurescale.com>
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user