microsoft_ads_get_insights

Get Microsoft Ads Insights

Microsoft

Description

Flexible Microsoft Advertising report query. Lets you pick exactly which report type, columns, date range, aggregation, and filters to apply. Use this tool when you need columns or report types not covered by microsoft_ads_get_performance_report. Supported report types: CampaignPerformance, AdGroupPerformance, AdPerformance, KeywordPerformance, SearchQueryPerformance, AudiencePerformance. All columns must be valid for the chosen report_type (validated before submission). DON'T use this for standard breakdowns that have dedicated tools — they pre-select the right report type and columns, so prefer them: • Demographic / geo / device / time-of-day slices (AgeGroup, Gender, Device, Location, DayOfWeek, HourOfDay) → microsoft_ads_get_audience_report • Audience LIST / segment performance (remarketing, in-market, custom, similar) → microsoft_ads_get_audience_segment_report • A single account-wide performance total → microsoft_ads_get_account_summary • Per-campaign/ad-group/ad/keyword performance rows → microsoft_ads_get_performance_report • Search-term analysis → microsoft_ads_get_search_terms Reach for get_insights only when you need columns or a report_type those tools don't cover. IMPORTANT: This tool triggers Microsoft's async report pipeline (submit → poll → download). Expect 5–30 seconds per call. Large date ranges or many columns slow it down. Use date_preset for convenience, or date_range for precise control. PAGING: rows come back one page at a time, sorted Spend highest first when Spend is a requested column. Leave limit unset: each page is then sized so the whole response fits what MCP clients accept (up to ${DEFAULT_REPORT_PAGE_ROWS} rows, ending early at about ${RESPONSE_CHAR_BUDGET.toLocaleString('en-US')} characters, so wide rows give fewer rows per page). To get more rows, follow the cursor rather than raising limit; an explicit limit (max ${MAX_REPORT_PAGE_ROWS}) is exact. count is the total across all pages. While pagination.hasMore is true, call again with exactly the same parameters plus cursor = pagination.nextCursor; repeat until hasMore is false to collect every row. Later pages re-read the same report rather than running a new one (no queue wait, each row exactly once), and omit goal_breakdown, which only the first page carries. campaign_ids filters the rows on CampaignId, which is added to the columns (added_columns) when not requested. For standard campaign/ad group/ad performance metrics, prefer microsoft_ads_get_performance_report which pre-selects optimal columns and is simpler to use.

Read-onlyOpen-world

Usage

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "microsoft_ads_get_insights",
    "arguments": {
      "account_id": "1234567890",
      "report_type": "CampaignPerformance",
      "columns": [
        "CampaignId",
        "CampaignName",
        "CampaignType",
        "TimePeriod",
        "ImpressionSharePercent",
        "ImpressionLostToBudgetPercent",
        "ImpressionLostToRankAggPercent",
        "Impressions",
        "Spend"
      ],
      "date_preset": "LastMonth",
      "aggregation": "Monthly",
      "reason": "Analyze competitive impression share by campaign"
    }
  }
}

Parameters

NameTypeRequiredDescription
account_id string Required Microsoft Advertising Account ID (numeric string)minLength: 1, maxLength: 20, pattern: ^\d+$
report_type string Required Report type determining which dimensions and metrics are available. Options: CampaignPerformance, AdGroupPerformance, AdPerformance, KeywordPerformance, SearchQueryPerformance, AudiencePerformance.
CampaignPerformance AdGroupPerformance AdPerformance KeywordPerformance SearchQueryPerformance AudiencePerformance
columns array Required Columns to include in the report. Must be valid for the chosen report_type. Always include at least one dimension (e.g. CampaignId, TimePeriod) and one metric (e.g. Impressions). Column lists are validated at call time; invalid columns return an error listing valid values. Quality Score columns: QualityScore, ExpectedCtr, AdRelevance, LandingPageExperience on Campaign/AdGroup/Keyword reports; the HistoricalQualityScore, HistoricalExpectedCtr, HistoricalAdRelevance and HistoricalLandingPageExperience columns (Keyword only) work only with aggregation Daily. URL tracking columns (TrackingTemplate, CustomParameters, FinalUrlSuffix; DestinationUrl on Ad/Keyword; FinalUrl, FinalMobileUrl on Ad/Keyword) report each entity's OWN value — an empty value means it inherits from its parent — and only for entities with impressions in the date range. CustomParameters is formatted {_key}=value;{_key2}=value2. DestinationUrl is a legacy field and is usually empty. For a full tracking audit, including entities that have not served, use microsoft_ads_list_campaigns with include_url_tracking.
reason string Required Why this tool call is neededminLength: 1, maxLength: 500
Optional parameters (10)
NameTypeRequiredDescription
customer_id string Optional Customer/manager ID (CustomerId). Required when accessing accounts through an agency manager.minLength: 1
date_range object Optional Custom date range. Use either date_range or date_preset, not both.
date_preset string Optional Predefined date range. Options: Today, Yesterday, LastSevenDays, ThisWeek, LastWeek, LastFourWeeks, ThisMonth, LastMonth, LastThreeMonths, LastSixMonths, ThisYear, LastYear.
Today Yesterday LastSevenDays ThisWeek LastWeek LastFourWeeks ThisMonth LastMonth LastThreeMonths LastSixMonths ThisYear LastYear
aggregation string Optional Time aggregation for the report. Daily (default): one row per day. Weekly: one row per week. Monthly: one row per month. Summary: single totals row.
Daily Weekly Monthly Summary
campaign_ids array Optional Filter report to specific campaign IDs (up to 50). Rows are matched on CampaignId, so CampaignId is added to the columns when not requested (listed in added_columns).
ad_group_ids array Optional Narrow the report to these ad group IDs (up to 50). Supported for AdGroupPerformance, AdPerformance, KeywordPerformance, SearchQueryPerformance and AudiencePerformance; rejected with an error for CampaignPerformance. Each ad group's parent campaign is read from the local cache, or looked up under campaign_ids when given. With campaign_ids, every ad group must belong to one of those campaigns. An ad group that cannot be resolved is rejected with an error, never silently widened to the account.
breakdown_by_goal boolean Optional When true (default), runs a parallel GoalsAndFunnelsReport and attaches the results as goal_breakdown on the response. The caller controls which conversion columns to include — add AllConversionsQualified, AllRevenue, or ViewThroughConversionsQualified to the columns array directly if you want the all-goals family. Pass false to skip the parallel call when latency matters more than per-goal context. NOTE: there is no include_all_conversions flag on this tool. As the passthrough column-list tool, you control the All* columns explicitly via the columns parameter.
limit integer Optional Rows per page (1-10000). Usually omit it: the page is then sized so the whole response fits what MCP clients accept, up to 500 rows and ending early at about 45,000 characters, so wide rows give fewer rows per page. To get more rows, follow pagination.nextCursor rather than raising limit; set limit only if your client takes large responses. The whole report is sorted, Spend highest first when Spend is a requested column, then by the row's column values, and returned one page at a time. count is the total across all pages; while more rows remain, pagination.hasMore is true and pagination.nextCursor is set.min: 1, max: 10000
cursor string Optional Opaque cursor from pagination.nextCursor of the previous response; never construct one. To get the next page, repeat the call with exactly the same parameters (only limit may change) plus this cursor. Later pages re-read the same Microsoft report instead of generating a new one, so every row appears exactly once. Cursors expire with the report (about 24 hours). goal_breakdown is returned on the first page only.minLength: 1
connection_id string Optional Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs.

Examples

Campaign impression share for last month

{
  "account_id": "1234567890",
  "report_type": "CampaignPerformance",
  "columns": [
    "CampaignId",
    "CampaignName",
    "CampaignType",
    "TimePeriod",
    "ImpressionSharePercent",
    "ImpressionLostToBudgetPercent",
    "ImpressionLostToRankAggPercent",
    "Impressions",
    "Spend"
  ],
  "date_preset": "LastMonth",
  "aggregation": "Monthly",
  "reason": "Analyze competitive impression share by campaign"
}

hopkin microsoft insights get --account 1234567890 --report-type CampaignPerformance --columns CampaignId,CampaignName,CampaignType,TimePeriod,ImpressionSharePercent,ImpressionLostToBudgetPercent,ImpressionLostToRankAggPercent,Impressions,Spend --date-preset LastMonth --aggregation Monthly

Search query report with ad group filter

{
  "account_id": "1234567890",
  "report_type": "SearchQueryPerformance",
  "columns": [
    "CampaignName",
    "AdGroupName",
    "Keyword",
    "BidMatchType",
    "DeliveredMatchType",
    "SearchQuery",
    "TimePeriod",
    "Impressions",
    "Clicks",
    "Spend",
    "ConversionsQualified",
    "Ctr",
    "AverageCpc"
  ],
  "date_range": {
    "start": "2026-04-01",
    "end": "2026-04-17"
  },
  "aggregation": "Daily",
  "ad_group_ids": [
    "9876543210"
  ],
  "reason": "Identify wasted spend from broad match queries in a specific ad group"
}

hopkin microsoft insights get --account 1234567890 --report-type SearchQueryPerformance --columns CampaignName,AdGroupName,Keyword,BidMatchType,DeliveredMatchType,SearchQuery,TimePeriod,Impressions,Clicks,Spend,ConversionsQualified,Ctr,AverageCpc --date-range [object Object] --aggregation Daily --ad-group-ids 9876543210

Audience performance with bid adjustments

{
  "account_id": "1234567890",
  "customer_id": "5555555555",
  "report_type": "AudiencePerformance",
  "columns": [
    "CampaignName",
    "AdGroupName",
    "AudienceId",
    "AudienceName",
    "AudienceType",
    "BidAdjustment",
    "TimePeriod",
    "Impressions",
    "Clicks",
    "Spend",
    "ConversionsQualified",
    "Revenue"
  ],
  "date_preset": "LastThreeMonths",
  "aggregation": "Monthly",
  "reason": "Evaluate audience segment ROI for RLSA bid adjustments"
}

hopkin microsoft insights get --account 1234567890 --customer-id 5555555555 --report-type AudiencePerformance --columns CampaignName,AdGroupName,AudienceId,AudienceName,AudienceType,BidAdjustment,TimePeriod,Impressions,Clicks,Spend,ConversionsQualified,Revenue --date-preset LastThreeMonths --aggregation Monthly

Keyword quality score trends

{
  "account_id": "1234567890",
  "report_type": "KeywordPerformance",
  "columns": [
    "CampaignName",
    "AdGroupName",
    "Keyword",
    "BidMatchType",
    "QualityScore",
    "ExpectedCtr",
    "AdRelevance",
    "LandingPageExperience",
    "TimePeriod",
    "Impressions",
    "Clicks",
    "AverageCpc"
  ],
  "date_preset": "LastMonth",
  "aggregation": "Summary",
  "reason": "Identify keywords with low Quality Score for optimization"
}

hopkin microsoft insights get --account 1234567890 --report-type KeywordPerformance --columns CampaignName,AdGroupName,Keyword,BidMatchType,QualityScore,ExpectedCtr,AdRelevance,LandingPageExperience,TimePeriod,Impressions,Clicks,AverageCpc --date-preset LastMonth --aggregation Summary

Ad performance comparison for specific campaigns

{
  "account_id": "1234567890",
  "report_type": "AdPerformance",
  "columns": [
    "CampaignName",
    "AdGroupName",
    "AdId",
    "AdTitle",
    "AdType",
    "AdStatus",
    "TimePeriod",
    "Impressions",
    "Clicks",
    "Spend",
    "ConversionsQualified",
    "Ctr",
    "AverageCpc"
  ],
  "date_range": {
    "start": "2026-01-01",
    "end": "2026-03-31"
  },
  "aggregation": "Weekly",
  "campaign_ids": [
    "111111111",
    "222222222"
  ],
  "reason": "A/B test RSA ad copy effectiveness across Q1"
}

hopkin microsoft insights get --account 1234567890 --report-type AdPerformance --columns CampaignName,AdGroupName,AdId,AdTitle,AdType,AdStatus,TimePeriod,Impressions,Clicks,Spend,ConversionsQualified,Ctr,AverageCpc --date-range [object Object] --aggregation Weekly --campaign-ids 111111111,222222222