Skip to main content

Import Courses

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

WRITEghl.import_courses
  • Contract tier: agent_ready
  • Risk: write
  • Catalog version: 2026-07-12.2
  • Descriptor hash: 29fd387a94576dc1af253073228316951f9afbc9f4c6468a1651e438805ef852

Use this when importing an owned GHL course export through the official Courses public import endpoint. GHL category: Memberships / Courses. This writes course content into the authenticated GHL account, so only pass a provider-compatible import payload obtained from GHL course export/public import workflows. The official docs currently publish the endpoint method/path but not a detailed request schema; do not pass arbitrary local filesystem paths or invented fields.

Request Body

{
"jsonrpc": "2.0",
"id": "ghl-import-courses-example",
"method": "tools/call",
"params": {
"name": "ghl.import_courses",
"arguments": {
"payload": {},
"confirmApply": "confirmApply_example",
"altId": "altId_123",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"strictTenant": false,
"includeProviderResponse": false
}
}
}

Arguments Schema

{
"type": "object",
"required": [
"payload",
"confirmApply"
],
"properties": {
"altId": {
"type": "string",
"description": "Compatibility alias for locationId safety validation. It is not added to the provider payload unless it is already present inside payload."
},
"payload": {
"type": "object",
"description": "Provider-compatible JSON body for POST /courses/courses-exporter/public/import. Use the exact GHL course exporter/import payload; local file paths are not valid remote-agent input.",
"additionalProperties": true
},
"tenantId": {
"type": "string",
"description": "Tenant ID from list_tenants."
},
"locationId": {
"type": "string",
"description": "Optional GHL location ID for safety validation only. If provided, it must match the authenticated runtime location; it is not added to the provider payload because the official docs do not document it as a request field."
},
"confirmApply": {
"type": "string",
"description": "Required confirmation string. Must be exactly \"CONFIRM APPLY\" because importing courses creates account content."
},
"strictTenant": {
"type": "boolean",
"default": true,
"description": "Require tenantId to match locationId routing (default: true)."
},
"includeProviderResponse": {
"type": "boolean",
"default": false,
"description": "Defaults to false. Set true only when troubleshooting and the user needs the raw provider import response."
}
},
"additionalProperties": false
}

Output Schema

{
"type": "object",
"required": [
"ok",
"data",
"error",
"meta"
],
"properties": {
"ok": {
"type": "boolean",
"description": "Whether the GHL MCP operation completed successfully."
},
"data": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "array",
"items": {}
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Tool-specific GHL or local navigation result when ok is true."
},
"meta": {
"type": "object",
"description": "Safe execution, routing, and timing metadata.",
"additionalProperties": true
},
"error": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"description": "Safe error details when ok is false; credential values are never returned."
}
},
"description": "Normalized GHL MCP response envelope.",
"additionalProperties": false
}

Code Examples

curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "ghl-import-courses-example",
"method": "tools/call",
"params": {
"name": "ghl.import_courses",
"arguments": {
"payload": {},
"confirmApply": "confirmApply_example",
"altId": "altId_123",
"tenantId": "tenantId_123",
"locationId": "locationId_123",
"strictTenant": false,
"includeProviderResponse": false
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool ghl.import_courses executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}