mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-25 23:35:19 +02:00
Some consistency changes
This commit is contained in:
@@ -72,7 +72,7 @@ This MCP server attempts to exercise all the features of the MCP protocol. It is
|
|||||||
- Embedded resource with `type: "resource"`
|
- Embedded resource with `type: "resource"`
|
||||||
- Text instruction for using the resource URI
|
- Text instruction for using the resource URI
|
||||||
|
|
||||||
9. `elicitationDemo`
|
9. `startElicitation`
|
||||||
- Initiates an elicitation (interaction) within the MCP client.
|
- Initiates an elicitation (interaction) within the MCP client.
|
||||||
- Inputs:
|
- Inputs:
|
||||||
- `color` (string): Favorite color
|
- `color` (string): Favorite color
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ const GetResourceReferenceSchema = z.object({
|
|||||||
.describe("ID of the resource to reference (1-100)"),
|
.describe("ID of the resource to reference (1-100)"),
|
||||||
});
|
});
|
||||||
|
|
||||||
const ElicitationSchema = z.object({
|
const itationSchema = z.object({
|
||||||
message: z.string().describe("Message to use for elicitation"),
|
message: z.string().describe("Message to use for elicitation"),
|
||||||
includeSchema: z
|
includeSchema: z
|
||||||
.boolean()
|
.boolean()
|
||||||
@@ -103,7 +103,7 @@ enum ToolName {
|
|||||||
GET_TINY_IMAGE = "getTinyImage",
|
GET_TINY_IMAGE = "getTinyImage",
|
||||||
ANNOTATED_MESSAGE = "annotatedMessage",
|
ANNOTATED_MESSAGE = "annotatedMessage",
|
||||||
GET_RESOURCE_REFERENCE = "getResourceReference",
|
GET_RESOURCE_REFERENCE = "getResourceReference",
|
||||||
ELICITATION_DEMO = "elicitationDemo",
|
ELICITATION = "startElicitation",
|
||||||
}
|
}
|
||||||
|
|
||||||
enum PromptName {
|
enum PromptName {
|
||||||
@@ -485,7 +485,7 @@ export const createServer = () => {
|
|||||||
inputSchema: zodToJsonSchema(GetResourceReferenceSchema) as ToolInput,
|
inputSchema: zodToJsonSchema(GetResourceReferenceSchema) as ToolInput,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: ToolName.ELICITATION_DEMO,
|
name: ToolName.ELICITATION,
|
||||||
description: "Demonstrates the Elicitation feature by asking the user to provide information about their favorite color, number, and pets.",
|
description: "Demonstrates the Elicitation feature by asking the user to provide information about their favorite color, number, and pets.",
|
||||||
inputSchema: zodToJsonSchema(ElicitationSchema) as ToolInput,
|
inputSchema: zodToJsonSchema(ElicitationSchema) as ToolInput,
|
||||||
},
|
},
|
||||||
@@ -678,7 +678,7 @@ export const createServer = () => {
|
|||||||
return { content };
|
return { content };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name === ToolName.ELICITATION_DEMO) {
|
if (name === ToolName.ELICITATION) {
|
||||||
const { message, includeSchema } = ElicitationSchema.parse(args);
|
const { message, includeSchema } = ElicitationSchema.parse(args);
|
||||||
|
|
||||||
const elicitationResult = await requestElicitation(
|
const elicitationResult = await requestElicitation(
|
||||||
|
|||||||
Reference in New Issue
Block a user