@@ -114,6 +114,7 @@ export class McpServer {
114
114
( [ name , tool ] ) : Tool => {
115
115
const toolDefinition : Tool = {
116
116
name,
117
+ title : tool . title ,
117
118
description : tool . description ,
118
119
inputSchema : tool . inputSchema
119
120
? ( zodToJsonSchema ( tool . inputSchema , {
@@ -123,10 +124,6 @@ export class McpServer {
123
124
annotations : tool . annotations ,
124
125
} ;
125
126
126
- if ( tool . title !== undefined ) {
127
- toolDefinition . title = tool . title ;
128
- }
129
-
130
127
if ( tool . outputSchema ) {
131
128
toolDefinition . outputSchema = zodToJsonSchema (
132
129
tool . outputSchema ,
@@ -472,19 +469,14 @@ export class McpServer {
472
469
( [ , prompt ] ) => prompt . enabled ,
473
470
) . map (
474
471
( [ name , prompt ] ) : Prompt => {
475
- const promptDefinition : Prompt = {
472
+ return {
476
473
name,
474
+ title : prompt . title ,
477
475
description : prompt . description ,
478
476
arguments : prompt . argsSchema
479
477
? promptArgumentsFromSchema ( prompt . argsSchema )
480
478
: undefined ,
481
479
} ;
482
-
483
- if ( prompt . title !== undefined ) {
484
- promptDefinition . title = prompt . title ;
485
- }
486
-
487
- return promptDefinition ;
488
480
} ,
489
481
) ,
490
482
} ) ,
0 commit comments