Skip to main content
Glama

hubspot-list-properties

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';

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