Skip to main content
Glama
ajaystream

HubSpot MCP Server

by ajaystream

hubspot-list-workflows

Read-onlyIdempotent

Retrieve a paginated list of workflows from HubSpot with ID, name, type, and status. Control results using limit and after parameters for efficient workflow management.

Instructions

🎯 Purpose:
  1. This tool retrieves a paginated list of workflows from the HubSpot account.

🧭 Usage Guidance:
  1. Use the "limit" parameter to control the number of results returned per page.
  2. For pagination, use the "after" parameter with the value from the previous response's paging.next.after.
  3. This endpoint returns essential workflow information including ID, name, type, and status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoThe maximum number of workflows to return per page (1-100).
afterNoCursor token to fetch the next page of results. Use the paging.next.after value from the previous response.

Implementation Reference

  • The process method that executes the hubspot-list-workflows tool: constructs params from input, calls HubSpot API /automation/v4/flows, returns paginated results or error.
    async process(args) {
        try {
            const params = {};
            if (args.limit) {
                params.limit = args.limit;
            }
            if (args.after) {
                params.after = args.after;
            }
            const response = await this.client.get('/automation/v4/flows', {
                params,
            });
            const filteredResults = response.results;
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify({
                            results: filteredResults,
                            paging: response.paging,
                        }, null, 2),
                    },
                ],
            };
        }
        catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error listing HubSpot workflows: ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
                isError: true,
            };
        }
    }
  • Zod input schema (limit, after) and ToolDefinition (name, description, inputSchema, annotations) for the hubspot-list-workflows tool.
    const WorkflowsListSchema = z.object({
        limit: z
            .number()
            .min(1)
            .max(100)
            .optional()
            .default(20)
            .describe('The maximum number of workflows to return per page (1-100).'),
        after: z
            .string()
            .optional()
            .describe('Cursor token to fetch the next page of results. Use the paging.next.after value from the previous response.'),
    });
    const ToolDefinition = {
        name: 'hubspot-list-workflows',
        description: `
        🎯 Purpose:
          1. This tool retrieves a paginated list of workflows from the HubSpot account.
    
        🧭 Usage Guidance:
          1. Use the "limit" parameter to control the number of results returned per page.
          2. For pagination, use the "after" parameter with the value from the previous response's paging.next.after.
          3. This endpoint returns essential workflow information including ID, name, type, and status.
      `,
        inputSchema: zodToJsonSchema(WorkflowsListSchema),
        annotations: {
            title: 'List HubSpot Workflows',
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
        },
    };
  • Registers a new instance of WorkflowsListTool (hubspot-list-workflows) in the tools registry.
    registerTool(new WorkflowsListTool());
Behavior3/5

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

Annotations already provide strong behavioral hints (readOnlyHint: true, openWorldHint: true, idempotentHint: true, destructiveHint: false), so the description doesn't need to repeat safety information. It adds useful context about pagination mechanics and the type of information returned (ID, name, type, status), which complements the annotations but doesn't provide rich additional behavioral details like rate limits or authentication requirements.

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 and Usage Guidance), uses bullet points efficiently, and contains no redundant or unnecessary information. Every sentence serves a purpose, making it easy to scan and understand quickly.

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 annotations cover safety and behavioral aspects, and the schema fully documents parameters, the description provides adequate context for a list operation. However, without an output schema, the description could benefit from more detail about the response structure beyond 'essential workflow information including ID, name, type, and status,' such as pagination metadata format or example output.

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 both parameters ('limit' and 'after') with their constraints and purposes. The description reiterates this information in the Usage Guidance section but doesn't add significant semantic value beyond what's in the schema, meeting the baseline expectation for high schema coverage.

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 'retrieves a paginated list of workflows from the HubSpot account,' which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'hubspot-get-workflow' (singular) or 'hubspot-list-objects,' which might cause confusion about when to use this specific list operation versus other listing tools.

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

Usage Guidelines4/5

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

The description provides clear guidance on how to use the 'limit' and 'after' parameters for pagination control, which is helpful for practical implementation. However, it lacks explicit guidance on when to use this tool versus alternatives like 'hubspot-get-workflow' for single workflows or 'hubspot-list-objects' for other HubSpot entities, leaving some contextual gaps.

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