Skip to main content
Glama
ajaystream

HubSpot MCP Server

by ajaystream

hubspot-list-properties

Read-onlyIdempotent

Retrieve all properties for HubSpot objects to understand available data structures and fields for CRM records like contacts, companies, and deals.

Instructions

🎯 Purpose:
  1. This tool retrieves a complete catalog of properties for any HubSpot object type.

🧭 Usage Guidance:
  1. This API has a large response that can consume a lot of tokens. Use the hubspot-list-objects tool to sample existing objects for the object type first.
  2. Try to use the hubspot-get-property tool to get a specific property.
  3. Use at the beginning of workflows to understand available data structures.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectTypeYesThe type of HubSpot object to get properties for. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.
archivedNoWhether to return only properties that have been archived.
includeHiddenNoWhether to include hidden properties in the response.

Implementation Reference

  • The process method implements the core logic: constructs query params for archived and includeHidden, calls HubSpot API /crm/v3/properties/{objectType}, filters results to key fields (name, label, type, description, groupName), returns formatted JSON or error response.
    async process(args) {
        try {
            const queryParams = new URLSearchParams();
            queryParams.append('archived', args.archived?.toString() || 'false');
            queryParams.append('includeHidden', args.includeHidden?.toString() || 'false');
            const response = await this.client.get(`/crm/v3/properties/${args.objectType}?${queryParams.toString()}`);
            // Filter each result to only include the specified fields
            const filteredResults = response.results.map((property) => ({
                name: property.name,
                label: property.label,
                type: property.type,
                description: property.description,
                groupName: property.groupName,
            }));
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify({
                            results: filteredResults,
                            paging: response.paging,
                        }, null, 2),
                    },
                ],
            };
        }
        catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error listing HubSpot properties for ${args.objectType}: ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
                isError: true,
            };
        }
    }
  • Input schema using Zod: requires objectType string, optional archived and includeHidden booleans with defaults to false.
    const PropertiesListSchema = z.object({
        objectType: z
            .string()
            .describe(`The type of HubSpot object to get properties for. Valid values include: ${HUBSPOT_OBJECT_TYPES.join(', ')}. For custom objects, use the hubspot-get-schemas tool to get the objectType.`),
        archived: z
            .boolean()
            .default(false)
            .describe('Whether to return only properties that have been archived.'),
        includeHidden: z
            .boolean()
            .default(false)
            .describe('Whether to include hidden properties in the response.'),
    });
  • ToolDefinition object specifying the tool name, description, converted input schema, and annotations like readOnlyHint.
    const ToolDefinition = {
        name: 'hubspot-list-properties',
        description: `
        🎯 Purpose:
          1. This tool retrieves a complete catalog of properties for any HubSpot object type.
    
        🧭 Usage Guidance:
          1. This API has a large response that can consume a lot of tokens. Use the hubspot-list-objects tool to sample existing objects for the object type first.
          2. Try to use the hubspot-get-property tool to get a specific property.
          3. Use at the beginning of workflows to understand available data structures.
      `,
        inputSchema: zodToJsonSchema(PropertiesListSchema),
        annotations: {
            title: 'List CRM Properties',
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
        },
    };
  • Instantiates and registers the PropertiesListTool with the tools registry.
    registerTool(new PropertiesListTool());
  • Imports the PropertiesListTool class from its implementation file.
    import { PropertiesListTool } from './properties/listPropertiesTool.js';
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it warns about 'large response that can consume a lot of tokens', which is important operational guidance not covered by the readOnlyHint, openWorldHint, idempotentHint, or destructiveHint annotations. This disclosure helps the agent manage token usage effectively.

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 efficiently structured with clear sections (Purpose, Usage Guidance) using emoji markers. Each sentence serves a distinct purpose: stating the core function, providing token usage warning, suggesting alternatives, and indicating workflow timing. There's no wasted text or redundancy.

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 rich annotations (readOnlyHint, openWorldHint, idempotentHint, destructiveHint) and 100% schema coverage, the description provides excellent context for a read-only listing tool. The only minor gap is the lack of output schema, but the description compensates by warning about large responses. It effectively guides the agent on when and how to use this tool.

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 all three parameters (objectType, archived, includeHidden). The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline expectation but doesn't provide extra value in this dimension.

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 verb 'retrieves' and resource 'complete catalog of properties for any HubSpot object type', making the purpose specific and clear. It distinguishes from sibling tools like hubspot-get-property (specific property) and hubspot-list-objects (objects rather than properties), providing clear differentiation.

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 alternatives: 'Use the hubspot-list-objects tool to sample existing objects first' and 'Try to use the hubspot-get-property tool to get a specific property'. It also advises 'Use at the beginning of workflows to understand available data structures', giving clear context for appropriate usage scenarios.

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