Agency Search Users
Immutable Catalog Entry
This descriptor comes from the active versioned Portal catalog.
- Contract tier:
legacy - Risk:
read - Catalog version:
2026-07-12.2 - Descriptor hash:
77e5bb874d8bd5fe094349da80feb559eaa5cf4abe063a0a95ecba09e6bbffc3
Agency-only: search users across locations using the company scope. GHL category: Launchpad. This is a read-only GHL API operation.
Request Body
{
"jsonrpc": "2.0",
"id": "ghl-agency-search-users-example",
"method": "tools/call",
"params": {
"name": "ghl.agency_search_users",
"arguments": {
"ids": [],
"role": "role_example",
"skip": 1,
"sort": "sort_example",
"type": "type_example",
"limit": 1,
"query": "query_example",
"companyId": "companyId_123",
"locationId": "locationId_123",
"sortDirection": "asc"
}
}
}
Arguments Schema
{
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Filter by specific user IDs."
},
"role": {
"type": "string",
"description": "Role filter."
},
"skip": {
"type": "number",
"default": 0,
"description": "Number of results to skip (default: 0)."
},
"sort": {
"type": "string",
"description": "Sort field for results."
},
"type": {
"type": "string",
"description": "User type filter."
},
"limit": {
"type": "number",
"default": 25,
"description": "Max results to return (default: 25)."
},
"query": {
"type": "string",
"description": "Search by user name or email."
},
"companyId": {
"type": "string",
"description": "Agency/company ID override (defaults to AGENCY_COMPANY_ID)."
},
"locationId": {
"type": "string",
"description": "Limit search to a specific location ID."
},
"sortDirection": {
"enum": [
"asc",
"desc"
],
"type": "string",
"description": "Sort direction (default: asc)."
},
"enabled2waySync": {
"type": "boolean",
"description": "Filter by 2-way sync status."
}
},
"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-agency-search-users-example",
"method": "tools/call",
"params": {
"name": "ghl.agency_search_users",
"arguments": {
"ids": [],
"role": "role_example",
"skip": 1,
"sort": "sort_example",
"type": "type_example",
"limit": 1,
"query": "query_example",
"companyId": "companyId_123",
"locationId": "locationId_123",
"sortDirection": "asc"
}
}
}'
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-agency-search-users-example",
"method": "tools/call",
"params": {
"name": "ghl.agency_search_users",
"arguments": {
"ids": [],
"role": "role_example",
"skip": 1,
"sort": "sort_example",
"type": "type_example",
"limit": 1,
"query": "query_example",
"companyId": "companyId_123",
"locationId": "locationId_123",
"sortDirection": "asc"
}
}
}),
});
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-agency-search-users-example",
"method": "tools/call",
"params": {
"name": "ghl.agency_search_users",
"arguments": {
"ids": [],
"role": "role_example",
"skip": 1,
"sort": "sort_example",
"type": "type_example",
"limit": 1,
"query": "query_example",
"companyId": "companyId_123",
"locationId": "locationId_123",
"sortDirection": "asc"
}
}
}
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.agency_search_users 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."
}