clean up mcp.ts
This commit is contained in:
parent
bce2dbfb83
commit
8719f93357
1 changed files with 3 additions and 11 deletions
|
|
@ -114,6 +114,7 @@ export class McpServer {
|
|||
([name, tool]): Tool => {
|
||||
const toolDefinition: Tool = {
|
||||
name,
|
||||
title: tool.title,
|
||||
description: tool.description,
|
||||
inputSchema: tool.inputSchema
|
||||
? (zodToJsonSchema(tool.inputSchema, {
|
||||
|
|
@ -123,10 +124,6 @@ export class McpServer {
|
|||
annotations: tool.annotations,
|
||||
};
|
||||
|
||||
if (tool.title !== undefined) {
|
||||
toolDefinition.title = tool.title;
|
||||
}
|
||||
|
||||
if (tool.outputSchema) {
|
||||
toolDefinition.outputSchema = zodToJsonSchema(
|
||||
tool.outputSchema,
|
||||
|
|
@ -472,19 +469,14 @@ export class McpServer {
|
|||
([, prompt]) => prompt.enabled,
|
||||
).map(
|
||||
([name, prompt]): Prompt => {
|
||||
const promptDefinition: Prompt = {
|
||||
return {
|
||||
name,
|
||||
title: prompt.title,
|
||||
description: prompt.description,
|
||||
arguments: prompt.argsSchema
|
||||
? promptArgumentsFromSchema(prompt.argsSchema)
|
||||
: undefined,
|
||||
};
|
||||
|
||||
if (prompt.title !== undefined) {
|
||||
promptDefinition.title = prompt.title;
|
||||
}
|
||||
|
||||
return promptDefinition;
|
||||
},
|
||||
),
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue