upload_document_creative
Upload PDF documents to the Metadata platform library so they can be promoted as LinkedIn Document Ads.
Writes creative
Creates or changes something in the account. Put it behind whatever review your agent uses.
What it does
Upload PDF documents to the Metadata platform library so they can be promoted as LinkedIn Document Ads.
Downloads each PDF from its URL and uploads it to the platform library as a DOCUMENT asset.
WARNING: PDF-ONLY: the downloaded file MUST have the `application/pdf` content-type
and be at most 100 MB (platform limits for document assets). Images go through
`upload_image_creative`, videos through `upload_video_creative`.
WARNING: WHEN YOU NEED TO CALL THIS:
Call this BEFORE `create_update_document_ad` ONLY when the document is not in the
library yet. If `search_library_creatives_by_name(contentTypes="DOCUMENT")` already
finds it, pass that id straight to `create_update_document_ad` as `libraryId`.
WORKFLOW INTEGRATION (when an upload IS needed):
1. Upload the PDF URL with this tool -> response contains the integer `id` (the library id).
2. Pass that integer `id` as `libraryId` in `create_update_document_ad`.
REQUIRED PARAMETERS:
- documents: Array of publicly accessible PDF URLs.
OPTIONAL PARAMETERS:
- names: Library label per document, positional against `documents`. Defaults to the
file name from the URL. Use the document's real title ("2026 B2B Benchmark Report")
so the library stays readable.
RESPONSE FORMAT:
Returns array of objects, one per document. `id` is returned as a string; pass it to
`create_update_document_ad` as an integer.
[
{"url": "https://example.com/report.pdf", "name": "2026 B2B Benchmark Report", "id": "15791", "success": true},
{"url": "https://example.com/bad.pdf", "name": "bad.pdf", "id": null, "success": false, "error": "..."}
]
ERROR HANDLING:
- If one upload fails, others continue.
- A content-type other than application/pdf is rejected with a clear error.Arguments
| Argument | Type | Notes | |
|---|---|---|---|
documents |
array | required | Array of PDF URLs to upload to the platform library. |
names |
array | Optional library labels, one per document in the same order. |
Request
Request template, not a complete runnable example. Replace placeholders, empty objects, arrays, and zero values with valid account-specific inputs. Read required fields and nested constraints in the full schema. Confirm the account, connected channels, and referenced assets before calling a write tool.
curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
-H "Authorization: $METADATA_PAT" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"upload_document_creative","arguments":{"documents":[]}}}'
Response
No recorded response. This tool writes to the account, so it is never executed to build these docs.
The request is an illustrative template. Fill required fields and check the current schema before calling it. No response is fabricated.
Related
Other creative tools: