Skip to main content
Glama

get_deal_details

Retrieve comprehensive details for a specific deal by providing its ID, enabling users to access pricing, terms, and source information for comparison.

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

  • Primary handler for the 'get_deal_details' tool. Parses args, calls aggregator.getDealDetails, and returns formatted JSON response with deal details.
    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), }, ], }; }
  • JSON schema defining input parameters for the get_deal_details tool: required dealId (string), optional source (string).
    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'], },
  • src/server.ts:243-260 (registration)
    Tool registration in getAvailableTools() method, returned by listTools handler. Includes name, description, and input schema.
    { 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'], }, },
  • Aggregator method that handles getDealDetails logic by delegating to specific provider if source provided, or trying all providers sequentially.
    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; }

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