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[];
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a deal but doesn't mention whether it's a read-only operation, what happens if the deal ID is invalid (e.g., error handling), or any rate limits or authentication requirements. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and wastes no space, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a read operation with 2 parameters) and lack of annotations and output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., deal details, error responses) or provide behavioral context like error handling or usage constraints, leaving the agent with incomplete information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('dealId' and 'properties') with descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining the format of 'dealId' or how 'properties' affects the output. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a specific deal by ID'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'hubspot_list_deals' or 'hubspot_get_deal_history', which would require mentioning this is for retrieving a single deal's details rather than listing multiple deals or accessing related data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention that this is for retrieving a single deal by ID, as opposed to 'hubspot_list_deals' for multiple deals or 'hubspot_get_deal_history' for historical data, nor does it specify prerequisites like needing a valid deal ID.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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