Skip to main content
Glama

HubSpot MCP Server

by ajaystream

hubspot-search-objects

Perform advanced, filtered searches across HubSpot object types using complex criteria. Retrieve targeted data by applying boolean logic with filter groups and specific properties. Supports pagination for efficient data retrieval.

Instructions

🎯 Purpose: 1. Performs advanced filtered searches across HubSpot object types using complex criteria. 📋 Prerequisites: 1. Use the 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. 📦 Returns: 1. Filtered collection matching specific criteria with pagination information. 🧭 Usage Guidance: 1. Preferred for targeted data retrieval when exact filtering criteria are known. Supports complex boolean logic through filter groups. 2. Use hubspot-list-objects when filter criteria is not specified or clear or when a search fails. 3. Use hubspot-batch-read-objects to retrieve specific objects by their IDs. 4. Use hubspot-list-associations to get the associations between objects. 🔍 Filtering Capabilities: 1. Think of "filterGroups" as separate search conditions that you want to combine with OR logic (meaning ANY of them can match). 2. If you want to find things that match ALL of several conditions (AND logic), put those conditions together in the same filters list. 3. If you want to find things that match AT LEAST ONE of several conditions (OR logic), put each condition in a separate filterGroup. 4. You can include a maximum of five filterGroups with up to 6 filters in each group, with a maximum of 18 filters in total.

Input Schema

NameRequiredDescriptionDefault
afterNoThe paging cursor token of the last successfully read resource.
filterGroupsNoGroups of filters to apply (combined with OR).
limitNoThe maximum number of results to display per page (max: 100).
objectTypeYesThe type of HubSpot object to search. 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.
propertiesNoA list of the properties to be returned in the response.
queryNoText to search across default searchable properties of the specified object type. Each object type has different searchable properties. For example: contacts (firstname, lastname, email, phone, company), companies (name, website, domain, phone), deals (dealname, pipeline, dealstage, description, dealtype), etc
sortsNoA list of sort criteria to apply to the results.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "after": { "description": "The paging cursor token of the last successfully read resource.", "type": "string" }, "filterGroups": { "description": "Groups of filters to apply (combined with OR).", "items": { "additionalProperties": false, "properties": { "filters": { "description": "Array of filters to apply (combined with AND).", "items": { "additionalProperties": false, "properties": { "highValue": { "description": "The upper bound value for range operators like BETWEEN. The lower bound is specified by the value attribute" }, "operator": { "description": "The operator to use for comparison", "enum": [ "EQ", "NEQ", "LT", "LTE", "GT", "GTE", "BETWEEN", "IN", "NOT_IN", "HAS_PROPERTY", "NOT_HAS_PROPERTY", "CONTAINS_TOKEN", "NOT_CONTAINS_TOKEN" ], "type": "string" }, "propertyName": { "description": "The name of the property to filter by", "type": "string" }, "value": { "description": "The value to compare against. Must be a string" }, "values": { "description": "Set of string values for multi-value operators like IN and NOT_IN.", "type": "array" } }, "required": [ "propertyName", "operator" ], "type": "object" }, "type": "array" } }, "required": [ "filters" ], "type": "object" }, "type": "array" }, "limit": { "default": 10, "description": "The maximum number of results to display per page (max: 100).", "maximum": 100, "minimum": 1, "type": "integer" }, "objectType": { "description": "The type of HubSpot object to search. 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.", "type": "string" }, "properties": { "description": "A list of the properties to be returned in the response.", "items": { "type": "string" }, "type": "array" }, "query": { "description": "Text to search across default searchable properties of the specified object type. Each object type has different searchable properties. For example: contacts (firstname, lastname, email, phone, company), companies (name, website, domain, phone), deals (dealname, pipeline, dealstage, description, dealtype), etc", "type": "string" }, "sorts": { "description": "A list of sort criteria to apply to the results.", "items": { "additionalProperties": false, "properties": { "direction": { "description": "The sort direction", "enum": [ "ASCENDING", "DESCENDING" ], "type": "string" }, "propertyName": { "description": "The name of the property to sort by", "type": "string" } }, "required": [ "propertyName", "direction" ], "type": "object" }, "type": "array" } }, "required": [ "objectType" ], "type": "object" }

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