Get Social Accounts
Immutable Catalog Entry
This descriptor comes from the active versioned Portal catalog.
- Contract tier:
agent_ready - Risk:
read - Catalog version:
2026-07-12.2 - Descriptor hash:
44259de0f1b4f8132fc68b9d88386dcc60fdedb00ea0f871099b483958d467fa
Get connected Social Planner accounts and groups for the authenticated GHL location. If GHL returns an empty account list, this tool runs a safe multi-page Social Planner post-history probe because GHL may show connected socials in the UI while the official account endpoint returns zero. Use the inferred account IDs for posting when present; do not tell the user they have zero connected socials when post history or platform activity is found. Use start_social_oauth only when a new connection is needed or no reusable account ID is visible. GHL category: Marketing. This is a read-only GHL API operation.
Request Body
{
"jsonrpc": "2.0",
"id": "ghl-get-social-accounts-example",
"method": "tools/call",
"params": {
"name": "ghl.get_social_accounts",
"arguments": {
"tenantId": "tenantId_123",
"fallbackLimit": 1,
"fallbackToDate": "fallbackToDate_example",
"fallbackFromDate": "fallbackFromDate_example",
"fallbackMaxPosts": 1,
"fallbackPageSize": 1,
"fallbackLookbackDays": 1,
"fallbackLookaheadDays": 1,
"includePostHistoryFallback": false
}
}
}
Arguments Schema
{
"type": "object",
"properties": {
"tenantId": {
"type": "string",
"description": "Tenant ID from list_tenants."
},
"fallbackLimit": {
"type": "number",
"default": 5000,
"description": "Deprecated alias for fallbackMaxPosts. Kept for older agents."
},
"fallbackToDate": {
"type": "string",
"description": "Optional ISO end date for the post-history probe. Use this to match the Social Planner UI date range when validating connected accounts."
},
"fallbackFromDate": {
"type": "string",
"description": "Optional ISO start date for the post-history probe. Use this to match the Social Planner UI date range when validating connected accounts."
},
"fallbackMaxPosts": {
"type": "number",
"default": 5000,
"description": "Maximum posts to inspect across fallback pages. Increase when the Social Planner UI has thousands of scheduled/history rows."
},
"fallbackPageSize": {
"type": "number",
"default": 500,
"description": "Posts per fallback page. Larger values reduce round trips but may increase provider response size."
},
"fallbackLookbackDays": {
"type": "number",
"default": 365,
"description": "Days back to search Social Planner posts when account listing is empty and fallbackFromDate is not supplied."
},
"fallbackLookaheadDays": {
"type": "number",
"default": 365,
"description": "Days forward to search Social Planner posts when account listing is empty and fallbackToDate is not supplied."
},
"includePostHistoryFallback": {
"type": "boolean",
"default": true,
"description": "When true, probe Social Planner posts if the official account endpoint returns zero accounts. This helps identify provider visibility gaps and may recover account IDs from existing posts."
}
},
"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
- Node.js
- Python
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-get-social-accounts-example",
"method": "tools/call",
"params": {
"name": "ghl.get_social_accounts",
"arguments": {
"tenantId": "tenantId_123",
"fallbackLimit": 1,
"fallbackToDate": "fallbackToDate_example",
"fallbackFromDate": "fallbackFromDate_example",
"fallbackMaxPosts": 1,
"fallbackPageSize": 1,
"fallbackLookbackDays": 1,
"fallbackLookaheadDays": 1,
"includePostHistoryFallback": false
}
}
}'
const response = await fetch('https://portal.madpanda3d.com/api/mcp', {
method: 'POST',
headers: {
Authorization: 'Bearer mad_live_***',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "ghl-get-social-accounts-example",
"method": "tools/call",
"params": {
"name": "ghl.get_social_accounts",
"arguments": {
"tenantId": "tenantId_123",
"fallbackLimit": 1,
"fallbackToDate": "fallbackToDate_example",
"fallbackFromDate": "fallbackFromDate_example",
"fallbackMaxPosts": 1,
"fallbackPageSize": 1,
"fallbackLookbackDays": 1,
"fallbackLookaheadDays": 1,
"includePostHistoryFallback": false
}
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = 'https://portal.madpanda3d.com/api/mcp'
headers = {
'Authorization': 'Bearer mad_live_***',
'Content-Type': 'application/json',
}
payload = {
"jsonrpc": "2.0",
"id": "ghl-get-social-accounts-example",
"method": "tools/call",
"params": {
"name": "ghl.get_social_accounts",
"arguments": {
"tenantId": "tenantId_123",
"fallbackLimit": 1,
"fallbackToDate": "fallbackToDate_example",
"fallbackFromDate": "fallbackFromDate_example",
"fallbackMaxPosts": 1,
"fallbackPageSize": 1,
"fallbackLookbackDays": 1,
"fallbackLookaheadDays": 1,
"includePostHistoryFallback": false
}
}
}
response = requests.post(url, headers=headers, json=payload, timeout=60)
print(response.json())
Example Responses
- 200 Success
- 502 Upstream Error
{
"ok": true,
"message": "Tool ghl.get_social_accounts executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}
{
"ok": false,
"classification": "upstream_http_error",
"message": "Upstream MCP returned a non-success status."
}