Skip to main content
Glama

Metadata MCP Connector

Upload Document Creative

upload_document_creative

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.
            

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesNoOptional library labels, one per document in the same order.
documentsYesArray of PDF URLs to upload to the platform library.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes beyond the annotations by explaining that the tool downloads each PDF, enforces application/pdf content-type and 100 MB limits, returns per-document success/failure objects, and continues processing after individual failures. It also discloses the id string-to-integer conversion quirk, which is critical for correct downstream use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections: purpose, warnings, workflow integration, parameters, response format, and error handling. Every sentence contributes operational knowledge, and the critical workflow steps are explicitly numbered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no output schema, the description fully compensates by showing the response format with examples, explaining error conditions, and walking through the integration with create_update_document_ad. Nothing an agent needs to call this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is 100%, the description adds meaning: documents must be publicly accessible PDF URLs, names are positional against documents, default to the URL file name, and should use the real document title. This materially improves an agent's ability to supply high-quality input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: uploads PDF documents into the Metadata platform library as DOCUMENT assets for LinkedIn Document Ads. It explicitly distinguishes itself from sibling upload_image_creative and upload_video_creative via the PDF-only warning.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use guidance: call only when the document is not yet in the library, after checking search_library_creatives_by_name, and before create_update_document_ad. It also names the alternatives for non-PDF assets, leaving no ambiguity about tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources