Skip to main content
Glama
ZLeventer

hubspot-mcp

hs_get_contact

Retrieve a contact by ID to access all standard properties, associated company, and deal IDs.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contactIdYesHubSpot contact ID

Implementation Reference

  • The actual handler function that executes the 'hs_get_contact' tool logic. Calls hubspot GET endpoint with contact ID, standard properties, and associated company/deal IDs.
    export async function getContact(args: z.infer<typeof GetContactSchema>) {
      return hubspot(`/crm/v3/objects/contacts/${args.contactId}`, "GET", undefined, {
        properties: CONTACT_PROPS,
        associations: "companies,deals",
      });
    }
  • Zod schema for the 'hs_get_contact' tool input validation. Defines the required 'contactId' parameter.
    export const GetContactSchema = z.object({
      contactId: z.string().describe("HubSpot contact ID"),
    });
  • src/index.ts:89-94 (registration)
    Registration of the 'hs_get_contact' tool with the MCP server. Binds the name, description, schema, and handler.
    server.tool(
      "hs_get_contact",
      "Retrieve a single contact by ID with all standard properties and associated company/deal IDs.",
      GetContactSchema.shape,
      async (args) => { try { return ok(await getContact(args)); } catch (e) { return err(e); } },
    );
  • src/index.ts:6-14 (registration)
    Import statement that brings the GetContactSchema and getContact function from src/tools/contacts.ts into the registration file.
    // Contacts
    import {
      SearchContactsSchema, searchContacts,
      GetContactSchema, getContact,
      ContactByEmailSchema, contactByEmail,
      RecentContactsSchema, recentContacts,
      CreateContactSchema, createContact,
      UpdateContactSchema, updateContact,
    } from "./tools/contacts.js";
Behavior3/5

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

No annotations provided, so description carries the burden. It implies read-only operation ('Retrieve') but does not disclose auth requirements, rate limits, or what happens if contact not found. Adequate for a simple get, but could be more explicit.

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, front-loaded sentence with no wasted words. Efficiently conveys purpose and key return content.

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 no output schema, description reasonably states what is returned (standard properties + company/deal IDs). Lacks details on response format or edge cases, but acceptable for a simple retrieval.

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 coverage is 100% with description 'HubSpot contact ID' for the only parameter. Description adds no additional meaning beyond the schema; baseline score holds.

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 'Retrieve a single contact by ID' with specific verb and resource, and distinguishes from siblings like hs_contact_by_email and hs_search_contacts by focusing on ID-based retrieval and including return details (standard properties, associated IDs).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs alternatives. Does not mention prerequisites (e.g., having the contact ID) or contrast with similar siblings like hs_contact_by_email or hs_search_contacts.

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