Create Custom Field
Snapshot Catalog Entry
This page is generated from broker tools/list snapshot data.
Create a new custom field for custom objects or company (business). Supports various field types including text, number, options, date, file upload, etc.
Request Body
{
"jsonrpc": "2.0",
"id": "ghl-ghl-create-custom-field-example",
"method": "tools/call",
"params": {
"name": "ghl.ghl_create_custom_field",
"arguments": {
"dataType": "TEXT",
"fieldKey": "fieldKey_example",
"objectKey": "objectKey_example",
"parentId": "parentId_123",
"tenantId": "tenantId_123",
"strictTenant": false,
"locationId": "locationId_123",
"name": "name_example",
"placeholder": "placeholder_example",
"showInForms": false
}
}
}
Arguments Schema
{
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"strictTenant": {
"type": "boolean"
},
"locationId": {
"type": "string"
},
"name": {
"type": "string"
},
"placeholder": {
"type": "string"
},
"showInForms": {
"type": "boolean"
},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"key",
"label"
]
}
},
"acceptedFormats": {
"type": "string",
"enum": [
".pdf",
".docx",
".doc",
".jpg",
".jpeg",
".png",
".gif",
".csv",
".xlsx",
".xls",
"all"
]
},
"dataType": {
"type": "string",
"enum": [
"TEXT",
"LARGE_TEXT",
"NUMERICAL",
"PHONE",
"MONETORY",
"CHECKBOX",
"SINGLE_OPTIONS",
"MULTIPLE_OPTIONS",
"DATE",
"TEXTBOX_LIST",
"FILE_UPLOAD",
"RADIO",
"EMAIL"
]
},
"fieldKey": {
"type": "string"
},
"objectKey": {
"type": "string"
},
"maxFileLimit": {
"type": "number"
},
"allowCustomOption": {
"type": "boolean"
},
"parentId": {
"type": "string"
}
},
"required": [
"dataType",
"fieldKey",
"objectKey",
"parentId"
]
}
Code Examples
- cURL
- Node.js
- Python
curl -X POST 'https://madpanda3d.com/lab/mad-mcps/portal/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "ghl-ghl-create-custom-field-example",
"method": "tools/call",
"params": {
"name": "ghl.ghl_create_custom_field",
"arguments": {
"dataType": "TEXT",
"fieldKey": "fieldKey_example",
"objectKey": "objectKey_example",
"parentId": "parentId_123",
"tenantId": "tenantId_123",
"strictTenant": false,
"locationId": "locationId_123",
"name": "name_example",
"placeholder": "placeholder_example",
"showInForms": false
}
}
}'
const response = await fetch('https://madpanda3d.com/lab/mad-mcps/portal/api/mcp', {
method: 'POST',
headers: {
Authorization: 'Bearer mad_live_***',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "ghl-ghl-create-custom-field-example",
"method": "tools/call",
"params": {
"name": "ghl.ghl_create_custom_field",
"arguments": {
"dataType": "TEXT",
"fieldKey": "fieldKey_example",
"objectKey": "objectKey_example",
"parentId": "parentId_123",
"tenantId": "tenantId_123",
"strictTenant": false,
"locationId": "locationId_123",
"name": "name_example",
"placeholder": "placeholder_example",
"showInForms": false
}
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = 'https://madpanda3d.com/lab/mad-mcps/portal/api/mcp'
headers = {
'Authorization': 'Bearer mad_live_***',
'Content-Type': 'application/json',
}
payload = {
"jsonrpc": "2.0",
"id": "ghl-ghl-create-custom-field-example",
"method": "tools/call",
"params": {
"name": "ghl.ghl_create_custom_field",
"arguments": {
"dataType": "TEXT",
"fieldKey": "fieldKey_example",
"objectKey": "objectKey_example",
"parentId": "parentId_123",
"tenantId": "tenantId_123",
"strictTenant": false,
"locationId": "locationId_123",
"name": "name_example",
"placeholder": "placeholder_example",
"showInForms": 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.ghl_create_custom_field 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."
}