Skip to main content
Glama
ZLeventer

hubspot-mcp

hs_get_form

Retrieve a complete HubSpot form definition by providing the form GUID. Returns all fields, required properties, and redirect settings for use in form analysis or integration.

Instructions

Get full form definition including fields, required properties, and redirect settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formGuidYesHubSpot form GUID

Implementation Reference

  • Zod schema for hs_get_form input: requires formGuid (string) describing the HubSpot form GUID.
    export const GetFormSchema = z.object({
      formGuid: z.string().describe("HubSpot form GUID"),
    });
  • getForm handler function: takes formGuid and calls HubSpot GET /forms/v2/forms/{formGuid} to retrieve the full form definition.
    export async function getForm(args: z.infer<typeof GetFormSchema>) {
      return hubspot(`/forms/v2/forms/${args.formGuid}`);
    }
  • src/index.ts:51-56 (registration)
    Imports GetFormSchema and getForm from ./tools/forms.js.
    // Forms
    import {
      ListFormsSchema, listForms,
      GetFormSchema, getForm,
      FormSubmissionsSchema, formSubmissions,
    } from "./tools/forms.js";
  • src/index.ts:248-253 (registration)
    Registers the 'hs_get_form' tool on the MCP server with description, schema, and handler binding.
    server.tool(
      "hs_get_form",
      "Get full form definition including fields, required properties, and redirect settings.",
      GetFormSchema.shape,
      async (args) => { try { return ok(await getForm(args)); } catch (e) { return err(e); } },
    );
  • hubspot() helper: generic HTTP client that constructs the API URL, adds auth token, and returns JSON response.
    export async function hubspot<T = unknown>(
      path: string,
      method: "GET" | "POST" | "PATCH" | "DELETE" = "GET",
      body?: unknown,
      params?: Record<string, string | number | boolean>,
    ): Promise<T> {
      const token = getToken();
    
      let url = `${BASE_URL}${path}`;
      if (params && method === "GET") {
        const qs = new URLSearchParams(
          Object.entries(params).map(([k, v]) => [k, String(v)]),
        ).toString();
        if (qs) url += `?${qs}`;
      }
    
      const res = await fetch(url, {
        method,
        headers: {
          Authorization: `Bearer ${token}`,
          "Content-Type": "application/json",
        },
        ...(body && method !== "GET" ? { body: JSON.stringify(body) } : {}),
      });
    
      if (!res.ok) {
        const text = await res.text().catch(() => res.statusText);
        throw new HubSpotError(`HubSpot API error (${res.status}): ${text}`, res.status);
      }
    
      if (res.status === 204) return undefined as T;
      return (await res.json()) as T;
    }
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that the tool returns full form definition including fields, required properties, and redirect settings, indicating a read operation with no destructive side effects.

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 that is concise and front-loaded, efficiently conveying the tool's purpose without unnecessary words.

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?

For a simple get operation with one parameter and no output schema, the description fully explains what the tool returns. It is complete and sufficient for an agent to understand the tool's behavior.

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 one parameter 'formGuid' described as 'HubSpot form GUID'. The description does not add additional meaning beyond the schema, so baseline score of 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?

The description clearly states 'Get full form definition including fields, required properties, and redirect settings.' This is a specific verb and resource, and it distinguishes from sibling 'hs_list_forms' which likely only lists forms without full details.

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 guidance on when to use this tool versus alternatives like 'hs_list_forms'. The description does not specify prerequisites or context in which this tool is appropriate.

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