MCPOutils MCP/Médias/upload_asset
upload_asset
Writemedia:write
Upload a new file (e.g. a photo, image, PDF, or other file) into the agency's media library. Provide the file as a public https URL (fetched and stored — a URL pointing at a private/internal network address is rejected) or as base64 bytes. Max 100 MB. Optionally scope it to an account/client/location/brand, drop it straight into a folder, tag it, or associate it with locations. Returns the created asset (including its key, used by update_asset/delete_asset and folder/tag operations).
Paramètres
urlstringfacultatif
A public https URL to fetch and store. Use this OR base64.
base64stringfacultatif
Raw file bytes as base64 (a data: URL prefix is accepted). Use this OR url.
mimestringfacultatif
The file's MIME type. Inferred from the URL response or a data: URL prefix when omitted; required for plain base64 without a data: URL prefix.
filenamestringfacultatif
Filename to store. Defaults to the URL's basename, or "upload".
titlestringfacultatif
Display title. Defaults to the filename.
scopeType"account" | "client" | "location" | "brand"facultatif
Which kind of entity this asset belongs to.
scopeIdstringfacultatif
The id of the scoped entity (required together with scopeType) — a client id (list_clients) or location id (list_locations) for those two scope types; account/brand scoping has no lookup tool in this MCP surface.
folderIdstringfacultatif
A folder id (from list_asset_folders) to place this asset into immediately.
tagsstring[]facultatif
Tag names to apply immediately (created if they don't already exist).
locationIdsstring[]facultatif
Location ids (from list_locations) to associate this asset with.
Exemple de requête
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "upload_asset",
"arguments": {}
}
}Exemple de réponse
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.