@@ -164,8 +164,7 @@ export const createServer = () => {
164164 resources : { subscribe : true } ,
165165 tools : { } ,
166166 logging : { } ,
167- completions : { } ,
168- elicitation : { } ,
167+ completions : { }
169168 } ,
170169 instructions
171170 }
@@ -177,7 +176,7 @@ export const createServer = () => {
177176
178177 let logLevel : LoggingLevel = "debug" ;
179178 let logsUpdateInterval : NodeJS . Timeout | undefined ;
180- // Store client capabilities
179+ // Store client capabilities
181180 let clientCapabilities : ClientCapabilities | undefined ;
182181
183182 // Roots state management
@@ -523,11 +522,6 @@ export const createServer = () => {
523522 "Returns a resource reference that can be used by MCP clients" ,
524523 inputSchema : zodToJsonSchema ( GetResourceReferenceSchema ) as ToolInput ,
525524 } ,
526- {
527- name : ToolName . ELICITATION ,
528- description : "Demonstrates the Elicitation feature by asking the user to provide information about their favorite color, number, and pets." ,
529- inputSchema : zodToJsonSchema ( ElicitationSchema ) as ToolInput ,
530- } ,
531525 {
532526 name : ToolName . GET_RESOURCE_LINKS ,
533527 description :
@@ -548,7 +542,12 @@ export const createServer = () => {
548542 "Lists the current MCP roots provided by the client. Demonstrates the roots protocol capability even though this server doesn't access files." ,
549543 inputSchema : zodToJsonSchema ( ListRootsSchema ) as ToolInput ,
550544 } ) ;
551-
545+ if ( clientCapabilities ! . elicitation ) tools . push ( {
546+ name : ToolName . ELICITATION ,
547+ description : "Demonstrates the Elicitation feature by asking the user to provide information about their favorite color, number, and pets." ,
548+ inputSchema : zodToJsonSchema ( ElicitationSchema ) as ToolInput ,
549+ } ) ;
550+
552551 return { tools } ;
553552 } ) ;
554553
0 commit comments