Skip to main content
Glama
ajaystream

HubSpot MCP Server

by ajaystream

hubspot-get-property

Read-onlyIdempotent

Retrieve detailed metadata for a specific HubSpot object property, including its type, options, and configuration details.

Instructions

🎯 Purpose:
  1. This tool retrieves detailed information about a specific property for a HubSpot object type.
  2. You can use this to get all metadata related to a property, including its type, options,
     and other configuration details.

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 retrieve

Implementation Reference

  • The main handler function that fetches property details from the HubSpot CRM API endpoint /crm/v3/properties/{objectType}/{propertyName} and returns the JSON response or error.
    async process(args) {
        try {
            const response = await this.client.get(`/crm/v3/properties/${args.objectType}/${args.propertyName}`);
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify(response, null, 2),
                    },
                ],
            };
        }
        catch (error) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error retrieving HubSpot property ${args.propertyName} for ${args.objectType}: ${error instanceof Error ? error.message : String(error)}`,
                    },
                ],
                isError: true,
            };
        }
    }
  • Zod schema defining the input parameters: objectType (string) and propertyName (string) with descriptions.
    const GetPropertySchema = 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 retrieve'),
    });
  • Registers an instance of the GetPropertyTool in the tools registry.
    registerTool(new GetPropertyTool());
  • Imports the GetPropertyTool class for registration.
    import { GetPropertyTool } from './properties/getPropertyTool.js';
  • Tool definition object including name, description, input schema (converted to JSON schema), and annotations for MCP compliance.
    const ToolDefinition = {
        name: 'hubspot-get-property',
        description: `
        🎯 Purpose:
          1. This tool retrieves detailed information about a specific property for a HubSpot object type.
          2. You can use this to get all metadata related to a property, including its type, options,
             and other configuration details.
      `,
        inputSchema: zodToJsonSchema(GetPropertySchema),
        annotations: {
            title: 'Get CRM Property Details',
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
        },
    };
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=true, and idempotentHint=true, covering safety and idempotency. The description adds some context by specifying the scope of metadata retrieved (type, options, configuration details), but doesn't disclose additional behavioral traits like rate limits, authentication needs, or error handling. No contradiction with annotations exists.

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 appropriately sized and front-loaded with a clear purpose statement. It uses two concise bullet points with no wasted words, though the emoji and formatting slightly reduce efficiency. Every sentence earns its place by reinforcing the tool's function.

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 tool's moderate complexity (2 required parameters), rich annotations (covering safety and idempotency), and no output schema, the description is mostly complete. It explains what the tool does and the metadata scope, but could benefit from mentioning return format or error scenarios to fully compensate for the lack of output schema.

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?

Schema description coverage is 100%, with both parameters (objectType and propertyName) well-documented in the schema. The description doesn't add meaningful semantic details beyond what the schema provides, such as examples or edge cases. Baseline 3 is appropriate since the schema handles parameter documentation adequately.

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 clearly states the tool's purpose with specific verbs ('retrieves detailed information', 'get all metadata') and resources ('specific property for a HubSpot object type'). It distinguishes itself from sibling tools like hubspot-list-properties (which lists properties) by focusing on retrieving detailed metadata for a single property.

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 context for when to use this tool ('to get all metadata related to a property'), but it doesn't explicitly mention when not to use it or name specific alternatives. For example, it doesn't contrast with hubspot-list-properties for browsing properties or hubspot-get-schemas for custom objects, though the schema hints at the latter.

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