Skip to main content
Glama
ZLeventer

hubspot-mcp

hs_get_company

Retrieve a single HubSpot company by its ID to get all standard properties along with associated contact and deal IDs.

Instructions

Retrieve a single company by ID with all standard properties and associated contact/deal IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyIdYesHubSpot company ID

Implementation Reference

  • The actual handler function for hs_get_company. Calls hubspot API to retrieve a single company by ID with standard properties and associated contact/deal IDs.
    export async function getCompany(args: z.infer<typeof GetCompanySchema>) {
      return hubspot(`/crm/v3/objects/companies/${args.companyId}`, "GET", undefined, {
        properties: COMPANY_PROPS,
        associations: "contacts,deals",
      });
    }
  • Zod schema for hs_get_company input validation. Expects a single required field: companyId (string).
    export const GetCompanySchema = z.object({
      companyId: z.string().describe("HubSpot company ID"),
    });
  • src/index.ts:133-138 (registration)
    Tool registration using server.tool() with name 'hs_get_company', schema, and handler wrapper.
    server.tool(
      "hs_get_company",
      "Retrieve a single company by ID with all standard properties and associated contact/deal IDs.",
      GetCompanySchema.shape,
      async (args) => { try { return ok(await getCompany(args)); } catch (e) { return err(e); } },
    );
  • Shared COMPANY_PROPS constant defining the list of standard company properties to retrieve.
    const COMPANY_PROPS = [
      "name", "domain", "industry", "numberofemployees", "annualrevenue",
      "city", "state", "country", "phone", "website",
      "hs_lead_status", "lifecyclestage", "createdate", "hubspot_owner_id",
    ].join(",");
Behavior4/5

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

With no annotations, the description adds value by specifying the return content (standard properties and associated contact/deal IDs), which goes beyond the schema. It does not cover rate limits or auth, but it's adequate for a read operation.

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?

Single sentence with no waste, front-loaded with the action and resource; highly efficient.

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

Completeness5/5

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

Given the low complexity (1 parameter, no output schema), the description fully explains what the tool does and returns, making it sufficient for correct invocation.

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?

The schema already provides 100% coverage for the single parameter with a description 'HubSpot company ID'; the tool description adds no further semantic details.

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 retrieves a single company by ID, includes standard properties and associated IDs, distinguishing it from siblings like hs_search_companies (search) and hs_get_contact (different entity).

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?

The description implies usage when you have a company ID but lacks explicit guidance on when to use alternatives (e.g., hs_search_companies) or exclusion scenarios.

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