diff --git a/provider/modelcontextprotocoltools/index.test.ts b/provider/modelcontextprotocoltools/index.test.ts index ff4b28be..80adb69f 100644 --- a/provider/modelcontextprotocoltools/index.test.ts +++ b/provider/modelcontextprotocoltools/index.test.ts @@ -81,7 +81,7 @@ describe('Module exports', () => { const isValidInput = ajv.validate(inputSchema, validInput); console.log('Valid input:', isValidInput, validInput); - const items = await proxy.items!({ mention: { uri: 'test', title: 'echo', data: { message: 'hello' } } }, {}) + const items = await proxy.items!({ mention: { uri: 'test', title: 'add', data: { a: 2, b: 3 } } }, {}) console.log(items) diff --git a/provider/modelcontextprotocoltools/index.ts b/provider/modelcontextprotocoltools/index.ts index 4e8362cd..814f4f13 100644 --- a/provider/modelcontextprotocoltools/index.ts +++ b/provider/modelcontextprotocoltools/index.ts @@ -128,10 +128,11 @@ class MCPToolsProxy implements Provider { return [...prefixMatches, ...substringMatches] } - // Add a method to get the stored schema - getToolSchema(toolName: string): any { - return JSON.parse(this.toolSchemas.get(toolName) as string) - } + + // Add a method to get the stored schema + getToolSchema(toolName: string): any { + return JSON.parse(this.toolSchemas.get(toolName) as string) + } async items?(params: ItemsParams, _settings: ProviderSettings): Promise { if (!this.mcpClient) {