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
| Name | Required | Description | Default |
|---|---|---|---|
| dealId | Yes | The ID of the deal to retrieve | |
| properties | No | List of properties to include in the results |
Implementation Reference
- index.ts:628-630 (handler)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"]); }
- index.ts:1550-1559 (handler)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) }], }; }
- index.ts:251-271 (schema)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, ],
- index.ts:92-95 (schema)TypeScript interface defining arguments for the getDeal tool, used for type checking in handler.interface GetDealArgs { dealId: string; properties?: string[]; }