li_get_creative
Get full details of a LinkedIn ad creative: headline, body, URL, media, CTA, status, and campaign URNs. Use to audit ad copy, debug rejected creatives, or extract landing page URLs for UTM analysis.
Instructions
Get full detail for a single LinkedIn ad creative, including the creative content (headline, body copy, destination URL, image/video URNs, call-to-action label), intendedStatus, associated campaign URNs, and creative type. Use when auditing ad copy and creative assets, debugging a rejected creative, or pulling the landing page URL to cross-reference with GA4 UTM data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| creative_id | Yes | Creative numeric ID or URN (urn:li:sponsoredCreative:123). Required. | |
| ad_account_id | No | Ad account numeric ID or URN. Defaults to LINKEDIN_DEFAULT_AD_ACCOUNT. |
Implementation Reference
- src/tools/campaigns.ts:150-167 (schema)Schema (getCreativeSchema) and handler function (getCreative) for the 'li_get_creative' tool. The schema requires creative_id (with optional ad_account_id). The handler resolves the ad account, unwraps the creative URN, and calls liGet on /adAccounts/{accountId}/creatives/{creativeId}.
// ─── get-creative ───────────────────────────────────────────────────────────── export const getCreativeSchema = { creative_id: z .string() .describe("Creative numeric ID or URN (urn:li:sponsoredCreative:123). Required."), ad_account_id: z .string() .optional() .describe("Ad account numeric ID or URN. Defaults to LINKEDIN_DEFAULT_AD_ACCOUNT."), }; export async function getCreative(args: { creative_id: string; ad_account_id?: string }) { const account = resolveAdAccount(args.ad_account_id); const accountId = unwrapURN(account); const creativeId = unwrapURN(urn("sponsoredCreative", args.creative_id)); return liGet(`/adAccounts/${accountId}/creatives/${creativeId}`); } - src/index.ts:102-107 (registration)Registration of the 'li_get_creative' tool on the MCP server with description, schema reference (getCreativeSchema), and handler binding (getCreative).
server.tool( "li_get_creative", "Get full detail for a single LinkedIn ad creative, including the creative content (headline, body copy, destination URL, image/video URNs, call-to-action label), intendedStatus, associated campaign URNs, and creative type. Use when auditing ad copy and creative assets, debugging a rejected creative, or pulling the landing page URL to cross-reference with GA4 UTM data.", getCreativeSchema, async (args) => { try { return ok(await getCreative(args)); } catch (e) { return err(e); } } );