get_available_sources
Retrieve a list of available deal sources or providers to access aggregated data for comparison and filtering through the Bargainer MCP Server.
Instructions
Get list of available deal sources/providers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:400-414 (handler)The main handler function for the 'get_available_sources' tool. It calls the aggregator's getProviders() method to retrieve the list of available sources and returns a formatted MCP response.private async handleGetAvailableSources() { const sources = this.aggregator.getProviders(); return { content: [ { type: 'text', text: JSON.stringify({ success: true, sources: sources }, null, 2), }, ], }; }
- src/server.ts:276-282 (registration)Registration of the 'get_available_sources' tool in the getAvailableTools() method, which is used by the MCP listTools request handler. Includes name, description, and input schema.name: 'get_available_sources', description: 'Get list of available deal sources/providers', inputSchema: { type: 'object', properties: {}, }, },
- src/server.ts:278-281 (schema)Input schema definition for the 'get_available_sources' tool (empty object as it takes no parameters).inputSchema: { type: 'object', properties: {}, },
- src/services/aggregator.ts:15-17 (helper)Supporting helper method in DealAggregator class that returns the array of registered provider names, invoked by the tool handler.getProviders(): string[] { return Array.from(this.providers.keys()); }