Skip to main content
Glama
ajaystream

HubSpot MCP Server

by ajaystream

hubspot-get-engagement

Read-onlyIdempotent

Retrieve HubSpot engagements by ID to access CRM interaction data, enabling users to view specific customer touchpoints and communication records.

Instructions

🎯 Purpose:
  1. Retrieves a HubSpot engagement by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
engagementIdYesThe ID of the engagement to retrieve

Implementation Reference

  • The process method of GetEngagementTool class executes the tool logic: fetches engagement by ID from HubSpot API and returns formatted response or error.
    async process(args) {
        try {
            const { engagementId } = args;
            const response = await this.client.get(`/engagements/v1/engagements/${engagementId}`);
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify(response, null, 2),
                    },
                ],
            };
        }
        catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error retrieving HubSpot engagement: ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
                isError: true,
            };
        }
  • Defines the input schema using Zod for engagementId and the full tool definition including name, description, and JSON schema conversion.
    const GetEngagementSchema = z.object({
        engagementId: z.number().int().positive().describe('The ID of the engagement to retrieve'),
    });
    const ToolDefinition = {
        name: 'hubspot-get-engagement',
        description: `
        🎯 Purpose:
          1. Retrieves a HubSpot engagement by ID.
      `,
        inputSchema: zodToJsonSchema(GetEngagementSchema),
        annotations: {
            title: 'Get Engagement',
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
        },
    };
  • Registers an instance of the GetEngagementTool in the central tools registry.
    registerTool(new GetEngagementTool());
Behavior3/5

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

Annotations already provide comprehensive behavioral hints (readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true). The description adds no additional behavioral context about rate limits, authentication requirements, error conditions, or what constitutes a valid engagement ID beyond the schema's exclusiveMinimum constraint.

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 extremely concise with just one clear sentence. The emoji and numbered formatting add visual structure without unnecessary verbosity. Every word serves a purpose with zero wasted content.

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

Completeness3/5

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

For a simple read operation with comprehensive annotations and full schema coverage, the description is minimally adequate. However, without an output schema, the description doesn't indicate what information is returned about engagements (e.g., fields, structure, or relationship to other HubSpot objects), leaving a gap in understanding the tool's full utility.

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?

With 100% schema description coverage, the input schema already fully documents the single 'engagementId' parameter. The description adds no additional semantic context about what an engagement ID represents, format examples, or how to obtain valid IDs beyond what's in the schema.

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 tool's purpose with a specific verb ('Retrieves') and resource ('HubSpot engagement by ID'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate itself from sibling tools like 'hubspot-list-objects' or 'hubspot-search-objects' which might also retrieve engagements in different ways.

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. With sibling tools like 'hubspot-list-objects', 'hubspot-search-objects', and 'hubspot-batch-read-objects' available, there's no indication whether this is for single-record lookups versus bulk operations or filtered searches.

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

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