Skip to main content
Glama
ajaystream

HubSpot MCP Server

by ajaystream

hubspot-get-workflow

Read-onlyIdempotent

Retrieve detailed information about a specific HubSpot workflow, including actions, enrollment criteria, and scheduling, using the workflow ID.

Instructions

🎯 Purpose:
  1. This tool retrieves detailed information about a specific workflow from the HubSpot account.

🧭 Usage Guidance:
  1. Use the "flowId" parameter to specify which workflow to retrieve.
  2. This endpoint returns complete workflow information including actions, enrollment criteria, and scheduling.
  3. Use the hubspot-list-workflows tool first to identify the workflow ID you need.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flowIdYesThe ID of the workflow to retrieve

Implementation Reference

  • The handler function that executes the core logic of the tool by calling the HubSpot API to retrieve workflow details for the given flowId.
    async process(args) {
        try {
            const response = await this.client.get(`/automation/v4/flows/${args.flowId}`);
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify(response, null, 2),
                    },
                ],
            };
        }
        catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error retrieving HubSpot workflow (ID: ${args.flowId}): ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
                isError: true,
            };
        }
    }
  • Input schema using Zod for validation of flowId parameter and the complete tool definition including name, description, and JSON schema conversion.
    const GetWorkflowSchema = z.object({
        flowId: z.string().describe('The ID of the workflow to retrieve'),
    });
    const ToolDefinition = {
        name: 'hubspot-get-workflow',
        description: `
        🎯 Purpose:
          1. This tool retrieves detailed information about a specific workflow from the HubSpot account.
    
        🧭 Usage Guidance:
          1. Use the "flowId" parameter to specify which workflow to retrieve.
          2. This endpoint returns complete workflow information including actions, enrollment criteria, and scheduling.
          3. Use the hubspot-list-workflows tool first to identify the workflow ID you need.
      `,
        inputSchema: zodToJsonSchema(GetWorkflowSchema),
        annotations: {
            title: 'Get HubSpot Workflow Details',
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
        },
    };
  • Registers an instance of the GetWorkflowTool in the central tools registry.
    registerTool(new GetWorkflowTool());
Behavior4/5

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

The description adds valuable context beyond annotations by specifying what information is returned ('complete workflow information including actions, enrollment criteria, and scheduling'), which helps the agent understand the output format. Annotations already cover read-only, non-destructive, idempotent, and open-world hints, so the description appropriately focuses on behavioral details not captured in structured fields.

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 well-structured with clear sections (Purpose, Usage Guidance), uses bullet points efficiently, and every sentence adds value without redundancy. It's appropriately sized and front-loaded with essential information.

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

Completeness4/5

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

Given the tool's simplicity (1 parameter, 100% schema coverage, rich annotations), the description is mostly complete. It explains purpose, usage flow, and output content. The main gap is the lack of an output schema, but the description compensates by detailing what information is returned. For a read-only tool with good annotations, this is sufficient.

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%, with the single parameter 'flowId' fully documented in the schema. The description mentions the parameter but doesn't add semantic details beyond what the schema provides (e.g., format examples or constraints). This meets the baseline of 3 for high schema coverage.

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

Purpose5/5

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

The description explicitly states the tool's purpose as 'retrieves detailed information about a specific workflow from the HubSpot account,' which is a clear verb+resource combination. It distinguishes itself from sibling tools like hubspot-list-workflows (which lists workflows) by focusing on retrieving details for a specific workflow ID.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'Use the hubspot-list-workflows tool first to identify the workflow ID you need.' This clearly indicates the prerequisite and alternative tool, helping the agent understand the workflow for proper tool selection.

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