Add hub package
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import type { ToolRegistry } from '../tools/classes.toolregistry.js';
|
||||
|
||||
export interface IMcpToolDescriptor {
|
||||
name: string;
|
||||
description: string;
|
||||
inputSchema: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export class McpDescriptor {
|
||||
constructor(private toolRegistry: ToolRegistry) {}
|
||||
|
||||
public listMcpTools(): IMcpToolDescriptor[] {
|
||||
return this.toolRegistry.listTools().map((toolArg) => ({
|
||||
name: toolArg.id,
|
||||
description: toolArg.description,
|
||||
inputSchema: toolArg.inputSchema,
|
||||
}));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user