hs_get_property
Retrieve the complete definition of a HubSpot CRM property, including options, enum values, and validation rules. Specify the object type and property name to get full details.
Instructions
Get full definition of a single CRM property including options/enum values and validation rules.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| objectType | Yes | ||
| propertyName | Yes | Internal property name, e.g. 'lifecyclestage' |
Implementation Reference
- src/tools/properties.ts:28-30 (handler)The actual handler function that executes the hs_get_property tool logic. Calls HubSpot API GET /crm/v3/properties/{objectType}/{propertyName}.
export async function getProperty(args: z.infer<typeof GetPropertySchema>) { return hubspot(`/crm/v3/properties/${args.objectType}/${args.propertyName}`); } - src/tools/properties.ts:23-26 (schema)Zod schema defining the input parameters for hs_get_property: objectType (enum of CRM types) and propertyName (string).
export const GetPropertySchema = z.object({ objectType: z.enum(OBJECT_TYPES), propertyName: z.string().describe("Internal property name, e.g. 'lifecyclestage'"), }); - src/index.ts:287-292 (registration)Registers the hs_get_property tool with the MCP server, linking GetPropertySchema and the getProperty handler.
server.tool( "hs_get_property", "Get full definition of a single CRM property including options/enum values and validation rules.", GetPropertySchema.shape, async (args) => { try { return ok(await getProperty(args)); } catch (e) { return err(e); } }, ); - src/index.ts:65-68 (helper)Import statement that brings in GetPropertySchema and getProperty from the properties module.
import { ListPropertiesSchema, listProperties, GetPropertySchema, getProperty, } from "./tools/properties.js";