Skip to main content
Glama
zackscriven

ghl-mcp-server-v2

by zackscriven

ghl_course_create_enrollment

Enroll a contact in a course or membership offer using contact ID and offer ID. Grants course access through the Courses API with a location token.

Instructions

COURSES API — the {productId} path parameter is the course (product) id. Enroll Contact Grant a contact access to a membership offer. Requires a Location token with courses.write. Send Version: v3. Uses POST smart-list/user with source public_api (not the queued attach-offer-user path). Returns 200 when already enrolled and 201 when newly attached. Login tokens are never returned. checkoutFrom public_api is not in membership paidSources, so these grants are omitted from Net Revenue paid filters. Default-offer rows return 404. Endpoint: POST /courses/enrollments (Version header: v3; source: v3/courses-v3.json) Requires a Sub-Account (location) token. OAuth scopes: courses.write

Input Schema

NameRequiredDescriptionDefault
bodyYesRequest body (schema carried verbatim from the official OpenAPI spec).
locationIdYesLocation id or sub-account id is required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A3.9/5.0
Behavior5/5

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

With annotations present, the description adds substantial non-obvious context: HTTP status semantics (200 already enrolled, 201 newly attached), 404 for default-offer rows, that login tokens are never returned, and that checkoutFrom 'public_api' is excluded from Net Revenue paid filters. It also discloses the underlying implementation path (POST smart-list/user, source public_api rather than the queued attach-offer-user path).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical action and the key behavioral facts are stated up front, and most sentences carry distinct information (auth, status codes, revenue-filter caveat). It is jargon-heavy and the opening productId sentence is a detour, but there is little outright padding.

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?

For a mutation tool with no output schema, the description covers auth requirements, success/error status codes, and downstream side-effect implications well. It omits what the response body contains beyond status codes and leaves the productId/offerId relationship ambiguous.

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%, so offerId, contactId, and locationId are already documented. The description's only parameter claim references a {productId} path parameter that does not exist in the schema, adding mild confusion rather than meaning; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The line 'Grant a contact access to a membership offer' gives a clear verb+resource that separates it from siblings like ghl_course_delete_enrollment or ghl_course_list_enrollments. The preceding sentence about a '{productId} path parameter' is confusing since no such parameter exists in the schema, which slightly muddies first impressions.

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?

It states the required token/scopes ('Requires a Location token with courses.write') and notes the 200-vs-201 behavior for repeat enrollments, which aids correct invocation. However, it never says when to pick this over sibling operations (e.g., delete_enrollment, list_enrollments) or what prerequisites like an existing offer/contact imply.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools