Skip to main content
Glama

hubspot-list-properties

Retrieve a comprehensive catalog of properties for any HubSpot object type to understand available data structures. Use with specific object types to optimize workflows and manage data effectively.

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

NameRequiredDescriptionDefault
archivedNoWhether to return only properties that have been archived.
includeHiddenNoWhether to include hidden properties in the response.
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.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "archived": { "default": false, "description": "Whether to return only properties that have been archived.", "type": "boolean" }, "includeHidden": { "default": false, "description": "Whether to include hidden properties in the response.", "type": "boolean" }, "objectType": { "description": "The 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.", "type": "string" } }, "required": [ "objectType" ], "type": "object" }

Implementation Reference

  • The 'process' method implements the core logic of the 'hubspot-list-properties' tool: constructs query params, calls HubSpot CRM API to list properties for the specified objectType, filters the results to key fields, formats as JSON, and handles errors.
    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, }; } }
  • Zod input schema (PropertiesListSchema) defining parameters like objectType, archived, includeHidden; ToolDefinition with tool name, description, converted JSON schema, and annotations.
    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.'), }); 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, }, };
  • Registers the 'hubspot-list-properties' tool by instantiating the PropertiesListTool class and passing it to the registerTool function.
    registerTool(new PropertiesListTool());

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