Skip to main content
Glama
mcp-linkedin-ads

mcp-linkedin-ads

by mharnett

linkedin_ads_analytics

Query LinkedIn ad performance by custom pivot, metrics, date range, and filters to break down demographics, devices, campaigns, or creatives.

Instructions

Flexible analytics query with custom pivot, fields, and filters. Use for demographic breakdowns, device splits, creative performance, etc.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "start_date": "<start_date>",
      "end_date": "<end_date>",
      "pivot": "<pivot>"
    },
    "name": "linkedin_ads_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
pivotYesPivot dimension: ACCOUNT, CAMPAIGN_GROUP, CAMPAIGN, CREATIVE, MEMBER_COMPANY_SIZE, MEMBER_INDUSTRY, MEMBER_SENIORITY, MEMBER_JOB_FUNCTION, MEMBER_COUNTRY_V2, IMPRESSION_DEVICE_TYPE, etc.
fieldsNoMetrics to return. Default: impressions, clicks, costInLocalCurrency, landingPageClicks, oneClickLeads, oneClickLeadFormOpens, externalWebsiteConversions, externalWebsitePostClickConversions, totalEngagements, videoViews, videoCompletions, approximateMemberReach, dateRange, pivotValues. The server adds a derived `frequency` field (impressions / approximateMemberReach) when both are non-zero. Reach is only populated at pivots CAMPAIGN, CREATIVE, and CAMPAIGN_GROUP — it returns 0 at pivot=ACCOUNT.
end_dateYesEnd date YYYY-MM-DD
account_idNo
start_dateYesStart date YYYY-MM-DD
campaign_idsNoFilter by numeric string campaign IDs
time_granularityNoALL (default), DAILY, or MONTHLY
campaign_group_idsNoFilter by campaign group IDs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and discloses almost nothing: no auth requirements, no rate limits, no row caps, no note on what the response looks like or how to page it. The useful behavioral facts (derived frequency field, reach being zero at ACCOUNT pivot) live in the schema, not the description, so they earn no credit here.

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?

Two short sentences, front-loaded with the core purpose and then the use cases; nothing is padded. The trailing 'etc.' is slightly loose but takes only one word.

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

Completeness3/5

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

For an eight-parameter, multi-pivot reporting tool with no annotations and no output schema, the definition leaves the agent guessing about the return shape, row limits, and whether filters such as account_id are required for specific pivots. The rich schema compensates for most parameter questions, but the output contract is entirely undocumented.

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

Parameters3/5

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

Schema description coverage is 88%, so the schema already documents pivot enums, default field list, date formats, and filter IDs, which sets the baseline at 3. The description's 'custom pivot, fields, and filters' merely paraphrases those parameter names without adding syntax, constraints, or interactions between them.

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

Purpose4/5

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

Names a specific verb and resource ('Flexible analytics query') and enumerates the three knobs it exposes (pivot, fields, filters), plus concrete example analyses. It is distinguishable from the canned account/campaign performance siblings by the word 'flexible' and the custom pivot, though it never names those siblings.

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

Usage Guidelines3/5

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

'Use for demographic breakdowns, device splits, creative performance' gives use contexts, but those contexts are just restatements of the pivot enum values, so it adds little. There is no statement of when to prefer this over linkedin_ads_account_performance or linkedin_ads_campaign_performance and no exclusions or prerequisites.

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