Skip to main content
Glama
ZLeventer

hubspot-mcp

hs_list_properties

List all properties defined for a HubSpot CRM object type, with an option to return only custom fields. Use this to retrieve property definitions for contacts, companies, deals, tickets, products, or line items.

Instructions

List all properties defined for a CRM object type. Use customOnly=true to see only custom fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectTypeYesCRM object type
customOnlyNoReturn only custom properties

Implementation Reference

  • The `listProperties` function that executes the tool logic: calls the HubSpot CRM properties API, filters by customOnly, and returns a simplified property list.
    export async function listProperties(args: z.infer<typeof ListPropertiesSchema>) {
      const res = await hubspot<{ results: Array<{ name: string; label: string; type: string; fieldType: string; groupName: string; calculated: boolean }> }>(
        `/crm/v3/properties/${args.objectType}`,
      );
      const props = res.results ?? [];
      return {
        objectType: args.objectType,
        properties: (args.customOnly ? props.filter((p) => !p.calculated && p.groupName !== "contactinformation") : props)
          .map(({ name, label, type, fieldType, groupName }) => ({ name, label, type, fieldType, groupName })),
      };
    }
  • The Zod schema for tool input validation: requires objectType (enum of CRM object types) and optional customOnly boolean.
    export const ListPropertiesSchema = z.object({
      objectType: z.enum(OBJECT_TYPES).describe("CRM object type"),
      customOnly: z.boolean().default(false).optional().describe("Return only custom properties"),
    });
  • src/index.ts:280-285 (registration)
    Registration of the tool 'hs_list_properties' on the MCP server with its schema and handler binding.
    server.tool(
      "hs_list_properties",
      "List all properties defined for a CRM object type. Use customOnly=true to see only custom fields.",
      ListPropertiesSchema.shape,
      async (args) => { try { return ok(await listProperties(args)); } catch (e) { return err(e); } },
    );
  • The list of valid CRM object types used by the schema enums.
    const OBJECT_TYPES = ["contacts", "companies", "deals", "tickets", "products", "line_items"] as const;
Behavior2/5

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

No annotations provided, so description must cover behavioral traits. It only implies a read operation without disclosing details like pagination, rate limits, or authentication needs.

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?

Two concise sentences, no fluff, front-loaded with purpose and a usage hint.

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?

Adequate for a simple list tool with well-documented parameters, but no output schema means return structure is left to the agent's assumptions.

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 covers 100% of parameters, and description adds no new info beyond restating the schema's 'customOnly' description. Baseline 3 is appropriate.

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?

Description clearly states action ('List') and resource ('properties for a CRM object type'), distinguishing it from sibling 'hs_get_property' which retrieves 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides helpful guidance for 'customOnly' parameter but does not mention when to use this tool versus alternative listing tools or when not to use it.

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/ZLeventer/hubspot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server