Skip to main content

Upload Media File

Snapshot Catalog Entry

This page is generated from broker tools/list snapshot data.

POSTghl.upload_media_file

Upload a file to the media library or add a hosted file URL (max 25MB for direct uploads)

Request Body

{
"jsonrpc": "2.0",
"id": "ghl-upload-media-file-example",
"method": "tools/call",
"params": {
"name": "ghl.upload_media_file",
"arguments": {
"tenantId": "tenantId_123",
"file": "file_example",
"hosted": false,
"fileUrl": "https://example.com/resource",
"name": "name_example",
"parentId": "parentId_123",
"altType": "location",
"altId": "altId_123"
}
}
}

Arguments Schema

{
"type": "object",
"properties": {
"tenantId": {
"type": "string"
},
"file": {
"type": "string"
},
"hosted": {
"type": "boolean"
},
"fileUrl": {
"type": "string"
},
"name": {
"type": "string"
},
"parentId": {
"type": "string"
},
"altType": {
"type": "string",
"enum": [
"location",
"agency"
]
},
"altId": {
"type": "string"
}
},
"required": []
}

Code Examples

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-upload-media-file-example",
"method": "tools/call",
"params": {
"name": "ghl.upload_media_file",
"arguments": {
"tenantId": "tenantId_123",
"file": "file_example",
"hosted": false,
"fileUrl": "https://example.com/resource",
"name": "name_example",
"parentId": "parentId_123",
"altType": "location",
"altId": "altId_123"
}
}
}'

Example Responses

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