Skip to content

Commit

Permalink
Fixing testing and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
arafatkatze committed Jan 9, 2025
1 parent be5af84 commit e1b4ee3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion provider/modelcontextprotocoltools/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
9 changes: 5 additions & 4 deletions provider/modelcontextprotocoltools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ItemsResult> {
if (!this.mcpClient) {
Expand Down

0 comments on commit e1b4ee3

Please sign in to comment.