Skip to main content
Glama

Metadata MCP Connector

Resolve LinkedIn Ad Library Links to Metadata Ads

resolve_linkedin_ad_library_links
Read-only

Map LinkedIn Ad Library links (linkedin.com/ad-library/detail/), sponsoredCreative URNs or bare LinkedIn creative ids to the ads in this account's Metadata library, so an ad the user points at by its LinkedIn link can be REUSED in a new campaign instead of rebuilt.

               WHAT IT CAN AND CANNOT RESOLVE (repeat this to the user when a link is not found):
               - It resolves ONLY ads that were launched THROUGH METADATA. Every ad Metadata
                 publishes to LinkedIn is recorded with the LinkedIn creative id LinkedIn gave
                 it, and that id is exactly what the Ad Library link carries. Those come back
                 with the library ad (id, name, type) plus the experiment and campaign that ran
                 them, ready to attach by name.
               - An ad launched natively in LinkedIn Campaign Manager (a sponsored personal
                 post, a Thought Leader ad, anything built outside Metadata) is NOT in the
                 library and CANNOT be imported from the link, by this tool or any other. The
                 only way to run it here is to rebuild it from its source files (image, video,
                 PDF) with the ad tools.
               - LinkedIn only. Meta or Google ad library links are refused per item.

               HOW IT SEARCHES: the platform has no lookup by LinkedIn creative id, so this scans
               the account's LinkedIn ads newest first (100 per page, `max_pages` pages, default
               20, so the newest 2,000 ads) and stops as soon as every id is found. A miss with
               `reached_end: false` means the ad may simply be older than the scan: pass
               `campaign_ids` to narrow the scan to the campaigns that ran it, or raise
               `max_pages`. A miss with `reached_end: true` means the account never launched
               that ad through Metadata.

               PARAMETERS:
               - links: Ad Library URLs, `urn:li:sponsoredCreative:<id>` URNs or numeric LinkedIn
                 creative ids (1 to 20 per call).
               - campaign_ids: optional wizard campaign ids that restrict the scan.
               - max_pages: optional, 1 to 50, default 20.

               RETURNS: {success, found, not_found, scanned_ads, scanned_pages, reached_end,
               results: [{input, linkedin_creative_id, found: true, library_ad: {id, name, type,
               channel, status, image_url}, experiment: {id, name, goal}, campaign: {id, name,
               status}, stats: {spend, impressions, clicks, leads}, destination_url, reuse} |
               {input, linkedin_creative_id, found: false, reason}]}

               NEXT STEPS: attach a found ad by its library NAME through create_campaign /
               add_and_edit_campaign_elements (`ads.list`), or read it with
               get_ad_details(ids=<library_ad.id>). Never re-upload a found ad's creative: that
               creates a duplicate library entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksYesLinkedIn Ad Library URLs, sponsoredCreative URNs, or numeric LinkedIn creative ids.
max_pagesNoPages of 100 LinkedIn ads to scan, newest first. Default 20.
campaign_idsNoOptional wizard campaign ids to restrict the scan to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, and the description adds detailed scanning behavior (100 per page, max_pages default 20, stops when found), explains reached_end semantics, and warns against re-uploading creatives. No contradiction with annotations.

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

Conciseness4/5

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

Well-structured with clear headers and front-loaded purpose, but it is lengthy. Each section adds value, though some redundancy (e.g., repeating the cannot-resolve message) could be trimmed. Still, organization is strong.

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 no output schema, the description provides a complete return structure, error conditions, next steps, and limitations. An agent has all necessary information to call this correctly, including parameter formats and default values.

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

Parameters4/5

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

Schema covers all parameters, but the description adds specifics: link types (URL, URN, numeric id), count limits (1–20), max_pages range (1–50, default 20), and how campaign_ids restricts the scan. This goes beyond the schema descriptions.

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?

The description states a specific verb ('Map') and resource ('LinkedIn Ad Library links' to 'Metadata library'), and distinguishes from siblings by explicitly refusing Meta or Google links and noting it is LinkedIn-only. It also clarifies that it resolves external IDs to library ads, setting it apart from search tools.

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?

Explicitly states when to use: to reuse an ad in a new campaign. Provides clear when-not: cannot import ads launched natively in LinkedIn Campaign Manager, and gives the alternative of rebuilding from source files. Also advises on passing campaign_ids and raising max_pages for misses.

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