Skip to main content
Glama

campaign_and_resource_get

Read-only

Get campaigns or related resources.

Unless you already fetched it this session, call get_business_context (passing ds_id and account_id) to fetch applicable guidelines — e.g. which campaigns to focus on, how to evaluate performance, reporting preferences — and reuse that result for the rest of the session.

resource_type options (options go in params; each params key names the types it applies to):

  • campaigns (default): list, or one campaign with campaign_id. Ad groups/ads are INSIDE campaigns — use campaign_id + campaign_detail_level, not a separate resource_type.

  • health_check: 30-day snapshot of one campaign. Custom dates/breakdowns: use data_query instead

  • forecast: the platform's own delivery estimate for defined targeting across bid/daily-budget levels (AW/FA, account currency). For FA budget planning, campaign_planner is usually the better starting point.

  • assets: platform creative library (use id as asset_id) plus saved uploads/AI images (saved[], use upload_ref). Lists without opening creative_picker

  • pages (FA Pages), posts (FA promotable posts)

  • keyword_ideas/keyword_volumes (AW/AC)

  • targeting_search: search targeting catalog

  • reach_estimate: audience size

  • audiences, recommendations, history

  • experiments: campaign experiments / A/B tests with status, type and date range (AW)

  • negative_keyword_lists: shared negative keyword lists with keywords and campaigns using them (AW)

  • conversion_types: conversion actions and any pixels (definitions, not per-campaign counts). data_query for metrics

  • approval_status: outcome of a change sent for approval

  • campaign_planner: optimistic/expected/pessimistic outcomes for a Facebook Ads budget, benchmarked on similar advertisers (FA only, EUR). Not the platform's own estimate - that is forecast.

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": {
      "ds_id": "<ds_id>",
      "account_id": "<account_id>"
    },
    "name": "campaign_and_resource_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
ds_idYesAd platform: AW (Google), FA (Meta), AC (Microsoft), TIK (TikTok), LIA (LinkedIn), CGPTA (ChatGPT), SCM (Snapchat)
paramsNoResource-type-specific parameters Options for the chosen resource_type; each key names the resource types it applies to.
max_rowsNoMax results (default 50; raise e.g. 200 for more)
account_idYesAd account ID from accounts_discovery (e.g. '1234567890' or 'act_123456')
resource_typeNoResource to fetch (default: campaigns). See tool description for valid values.

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNo
notesNo
successYes
business_contextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description adds meaningful behavioral context such as the default resource_type (campaigns), what each resource type returns, and which parameters are required or mutually exclusive per type. It does not discuss result limits or pagination behavior beyond the max_rows schema field, leaving a small gap for a dispatch tool with ~15 resource types.

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?

Front-loaded with the core action and the prerequisite call, then organized into a scannable bulleted list of resource types. It is long, but nearly every line disambiguates a distinct resource type or a sibling-tool boundary; a few lines duplicate what the schema already states about required params.

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?

For a tool that dispatches across many resource types with a nested params object, the description covers selection, per-type requirements, defaults, and alternative tools, and an output schema exists so return values need not be described. An agent has enough to choose the right resource_type and parameter set without further exploration.

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 coverage is 100%, so the baseline is 3, but the description adds real value by grouping parameters by resource_type and clarifying cross-parameter behavior (e.g. ad_group_limit/offset with campaign_id, budget fields not combinable with max_campaign_duration). This goes beyond restating the per-field 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?

States a specific verb+resource ('Get campaigns or related resources') and then enumerates the concrete resource types available, so an agent knows exactly what the tool retrieves. It actively distinguishes itself from siblings by naming data_query, creative_picker, campaign_planner and forecast with the conditions that separate them.

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?

Explicit when-to-use guidance is present throughout: fetch get_business_context first unless already fetched this session, use campaign_id + campaign_detail_level for ad groups/ads instead of a separate resource_type, use data_query for custom dates/breakdowns, and campaign_planner vs forecast for FA budget planning. Alternatives and exclusions are named rather than implied.

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