Skip to main content
Glama

hubspot_get_deal

Retrieve specific deal details from HubSpot CRM using a deal ID to access sales pipeline information and transaction data for analysis.

Instructions

Get a specific deal by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dealIdYesThe ID of the deal to retrieve
propertiesNoList of properties to include in the results

Implementation Reference

  • Core handler function in HubSpotClient class that retrieves a specific deal by ID using the HubSpot CRM Deals API.
    async getDeal(dealId: string, properties?: string[]): Promise<any> { return await this.client.crm.deals.basicApi.getById(dealId, properties || ["dealname", "amount", "dealstage", "closedate"]); }
  • MCP server handler for CallToolRequest of 'hubspot_get_deal': validates input, calls HubSpotClient.getDeal, and formats response as JSON text.
    case "hubspot_get_deal": { const args = request.params.arguments as unknown as GetDealArgs; if (!args.dealId) { throw new Error("Missing required argument: dealId"); } const response = await hubspotClient.getDeal(args.dealId, args.properties); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • Tool definition including name, description, and JSON input schema for 'hubspot_get_deal'.
    const getDealTool: Tool = { name: "hubspot_get_deal", description: "Get a specific deal by ID", inputSchema: { type: "object", properties: { dealId: { type: "string", description: "The ID of the deal to retrieve", }, properties: { type: "array", items: { type: "string", }, description: "List of properties to include in the results", }, }, required: ["dealId"], }, };
  • index.ts:1707-1725 (registration)
    Registration of getDealTool in the list of available tools returned by ListToolsRequest handler.
    tools: [ searchContactsTool, getContactTool, createContactTool, updateContactTool, listDealsTool, getDealTool, createDealTool, updateDealTool, listCompaniesTool, getCompanyTool, getSalesAnalyticsTool, getDealHistoryTool, getDealNotesTool, getEngagementsByDealTool, getSalesPerformanceTool, getPipelineAnalyticsTool, getForecastAnalyticsTool, ],
  • TypeScript interface defining arguments for the getDeal tool, used for type checking in handler.
    interface GetDealArgs { dealId: string; properties?: string[]; }

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/scopiousdigital/hubspot-mcp'

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