Skip to main content
Glama

get_deal_details

Retrieve detailed information about a specific deal using its ID, with optional source specification, from the Bargainer MCP Server for accurate deal comparison and insights.

Instructions

Get detailed information about a specific deal

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dealIdYesThe ID of the deal to get details for
sourceNoThe source of the deal (optional)

Implementation Reference

  • src/server.ts:243-260 (registration)
    Tool registration definition including name, description, and input schema for the get_deal_details tool, returned by list tools handler.
    { name: 'get_deal_details', description: 'Get detailed information about a specific deal', inputSchema: { type: 'object', properties: { dealId: { type: 'string', description: 'The ID of the deal to get details for', }, source: { type: 'string', description: 'The source of the deal (optional)', }, }, required: ['dealId'], }, },
  • Primary handler function for the get_deal_details tool. Extracts dealId and optional source from args, calls aggregator to fetch details, and returns formatted JSON response.
    private async handleGetDealDetails(args: any) { const { dealId, source } = args; const deal = await this.aggregator.getDealDetails(dealId, source); return { content: [ { type: 'text', text: JSON.stringify({ success: deal !== null, deal: deal }, null, 2), }, ], }; }
  • DealAggregator helper method that retrieves deal details by delegating to the specified provider or iterating through all providers if source is unspecified.
    async getDealDetails(dealId: string, source?: string): Promise<Deal | null> { if (source && this.providers.has(source)) { const provider = this.providers.get(source); return provider ? await provider.getDealDetails(dealId) : null; } // Try all providers if source not specified for (const provider of this.providers.values()) { try { const deal = await provider.getDealDetails(dealId); if (deal) return deal; } catch (error) { console.error(`Error getting deal details from ${provider.getSourceName()}:`, error); } } return null; }
  • Slickdeals provider implementation of getDealDetails, fetching from Slickdeals API and transforming the response.
    async getDealDetails(dealId: string): Promise<Deal | null> { try { const response = await this.client.get(`/v2/deals/${dealId}`); if (response.data && response.data.deal) { return this.transformDeal(response.data.deal); } return null; } catch (error) { console.error('SlickDeals deal details error:', error); return null; } }
  • RapidAPI provider implementation of getDealDetails, fetching from RapidAPI deals endpoint and transforming.
    async getDealDetails(dealId: string): Promise<Deal | null> { try { const response = await this.client.get(`/deal/${dealId}`); if (response.data) { return this.transformDeal(response.data); } return null; } catch (error) { console.error('RapidAPI deal details error:', error); return null; } }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/karthiksivaramms/bargainer-mcp-client'

If you have feedback or need assistance with the MCP directory API, please join our Discord server