Skip to main content
Glama
ajaystream

HubSpot MCP Server

by ajaystream

hubspot-update-property

Update custom properties for HubSpot CRM objects to customize data structure, labels, descriptions, and display settings.

Instructions

🛡️ Guardrails:
  1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM.

🎯 Purpose:
  1. Updates existing custom properties for HubSpot object types, enabling data structure customization.

🧭 Usage Guidance:
  1. Use hubspot-list-objects tool to sample existing objects for the object type.
  2. If hubspot-list-objects tool's response isn't helpful, use hubspot-list-properties tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectTypeYesThe type of HubSpot object the property belongs to. 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.
propertyNameYesThe name of the property to update
labelNoA human-readable property label that will be shown in HubSpot
descriptionNoA description of the property that will be shown as help text
groupNameNoThe name of the property group the property belongs to
typeNoThe data type of the property
fieldTypeNoControls how the property appears in HubSpot
optionsNoA list of valid options for enumeration properties
formFieldNoWhether the property can be used in forms
hiddenNoWhether the property should be hidden in HubSpot
displayOrderNoThe order for displaying the property (lower numbers displayed first)
calculationFormulaNoA formula that is used to compute a calculated property

Implementation Reference

  • The process method of UpdatePropertyTool class that implements the tool's core logic: destructures input args, validates update data, patches the HubSpot property via client API, and formats success or error response.
    async process(args) {
        try {
            const { objectType, propertyName, ...updateData } = args;
            // Check if at least one field is provided for update
            if (Object.keys(updateData).length === 0) {
                throw new Error('At least one property field must be provided for update');
            }
            const response = await this.client.patch(`/crm/v3/properties/${objectType}/${propertyName}`, {
                body: updateData,
            });
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify(response, null, 2),
                    },
                ],
            };
        }
        catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error updating HubSpot property ${args.propertyName} for ${args.objectType}: ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
                isError: true,
            };
        }
    }
  • Zod schema defining the input structure and validation for the hubspot-update-property tool, including objectType, propertyName, and optional update fields.
    const UpdatePropertySchema = z.object({
        objectType: z
            .string()
            .describe(`The type of HubSpot object the property belongs to. Valid values include: ${HUBSPOT_OBJECT_TYPES.join(', ')}. For custom objects, use the hubspot-get-schemas tool to get the objectType.`),
        propertyName: z.string().describe('The name of the property to update'),
        label: z
            .string()
            .optional()
            .describe('A human-readable property label that will be shown in HubSpot'),
        description: z
            .string()
            .optional()
            .describe('A description of the property that will be shown as help text'),
        groupName: z
            .string()
            .optional()
            .describe('The name of the property group the property belongs to'),
        type: z
            .enum(['string', 'number', 'date', 'datetime', 'enumeration', 'bool'])
            .optional()
            .describe('The data type of the property'),
        fieldType: z
            .enum([
            'text',
            'textarea',
            'date',
            'file',
            'number',
            'select',
            'radio',
            'checkbox',
            'booleancheckbox',
            'calculation',
        ])
            .optional()
            .describe('Controls how the property appears in HubSpot'),
        options: z
            .array(PropertyOptionSchema)
            .optional()
            .describe('A list of valid options for enumeration properties'),
        formField: z.boolean().optional().describe('Whether the property can be used in forms'),
        hidden: z.boolean().optional().describe('Whether the property should be hidden in HubSpot'),
        displayOrder: z
            .number()
            .int()
            .optional()
            .describe('The order for displaying the property (lower numbers displayed first)'),
        calculationFormula: z
            .string()
            .optional()
            .describe('A formula that is used to compute a calculated property'),
    });
  • Registers an instance of UpdatePropertyTool with the central tool registry.
    registerTool(new UpdatePropertyTool());
  • ToolDefinition object containing the tool name, description, inputSchema (derived from Zod), and annotations for the hubspot-update-property tool.
    const ToolDefinition = {
        name: 'hubspot-update-property',
        description: `
        🛡️ Guardrails:
          1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM.
    
        🎯 Purpose:
          1. Updates existing custom properties for HubSpot object types, enabling data structure customization.
    
        🧭 Usage Guidance:
          1. Use hubspot-list-objects tool to sample existing objects for the object type.
          2. If hubspot-list-objects tool's response isn't helpful, use hubspot-list-properties tool.
      `,
        inputSchema: zodToJsonSchema(UpdatePropertySchema),
        annotations: {
            title: 'Update CRM Property',
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: false,
            openWorldHint: true,
        },
    };
Behavior3/5

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

The description adds valuable context beyond annotations: the 'Data Modification Warning' explicitly states this tool modifies HubSpot data and should only be used when the user explicitly requests CRM updates. Annotations already indicate readOnlyHint=false and destructiveHint=false, so the description reinforces this is a mutation tool but not destructive. However, it doesn't describe rate limits, authentication requirements, or what happens when updating non-existent properties.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Guardrails, Purpose, Usage Guidance) using emojis for visual organization. Each section contains 1-2 bullet points that are directly relevant. However, the Purpose section could be more concise, and some redundancy exists between the Guardrails warning and what annotations already convey.

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

Completeness3/5

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

For a mutation tool with 12 parameters and no output schema, the description provides adequate but not comprehensive context. It covers purpose, guardrails, and usage guidance but doesn't explain what the tool returns or provide examples of successful updates. Given the complexity and lack of output schema, more information about response format would be helpful.

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 documents all 12 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 'updates existing custom properties for HubSpot object types, enabling data structure customization.' This is a specific verb (updates) with resource (custom properties) and context (HubSpot object types). However, it doesn't explicitly distinguish this from sibling tools like 'hubspot-create-property' or 'hubspot-get-property' beyond the 'update' action.

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 usage guidance: 'Use hubspot-list-objects tool to sample existing objects for the object type' and 'If hubspot-list-objects tool's response isn't helpful, use hubspot-list-properties tool.' This gives practical steps for when to use this tool. However, it doesn't explicitly state when NOT to use it or mention alternatives like 'hubspot-create-property' for creating new properties instead of updating existing ones.

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