Skip to main content
Glama
HYPD-AI

HYPD AI - OpenAI Ads

by HYPD-AI

Get campaign insights

get_campaign_insights
Read-only

Retrieve performance insights for an ad campaign, including impressions, clicks, spend, and derived metrics. Aggregate by day or entity, sort by any metric, and paginate through results.

Instructions

Retrieve performance insights for a single campaign. Returns a list response (data[] with first_id/last_id/has_more for paging). Each row carries id, start_time, end_time, plus the projected fields such as impressions, clicks, spend, ctr, cpc, cpm, readable_time, campaign_name, ad_group_name, and ad_name. Combine aggregation_level, sort, and limit to rank entities (e.g. the top ad by clicks). Monetary metrics (spend, cpc, cpm) are in the account's currency as decimal values, not micros.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesThe ID of the campaign to report on.
sinceNoStart date of the reporting window (inclusive), YYYY-MM-DD. Combined with `until` into a date_range time filter.
untilNoEnd date of the reporting window (inclusive), YYYY-MM-DD. Combined with `since` into a date_range time filter.
time_granularityNoAggregation bucket size: 'daily' for one row per day, or 'none' for a single aggregated row over the whole window.
aggregation_levelNoScope each row is aggregated to (e.g. 'ad' to break results out per ad even when querying a campaign). Combine with `sort` + `limit` to rank entities.
fieldsNoFields to project in each row, e.g. ['ad_id','ad_name','campaign_name','readable_time','impressions','clicks','spend','ctr','cpc','cpm'].
sortNoSort expressions applied in order, e.g. [{ "field": "clicks", "direction": "desc" }] to rank by most clicks.
filtersNoAdvanced filter expressions, passed through to the API as-is.
limitNoMaximum number of rows to return (1-10000).
afterNoPagination cursor: pass `last_id` from a previous page to fetch the next page.
beforeNoPagination cursor: pass `first_id` from a previous page to fetch the previous page.
Behavior4/5

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

Annotations are readOnlyHint=true and openWorldHint=true. The description adds valuable context: pagination details (first_id/last_id/has_more), monetary unit clarification (decimal, not micros), and the ability to rank entities. 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?

A single paragraph of four sentences, front-loaded with the primary purpose. It could be slightly more concise by omitting the list of fields, but overall it is efficient and readable.

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

Completeness4/5

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

Given 11 parameters, no output schema, and the complexity of pagination and sorting, the description covers the key behavioral aspects: response structure, paging, currency format, and entity ranking. Lacks details on error conditions or advanced filtering, but is sufficient.

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 100%, so baseline is 3. The description provides some additional meaning (e.g., decimal currency, paging fields) but does not significantly augment individual parameter descriptions beyond what the schema already provides.

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?

Clearly states 'Retrieve performance insights for a single campaign' – a specific verb and resource, and distinguishes from siblings that target different scopes (e.g., get_account_insights, get_ad_insights).

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?

Implies usage for campaign-level performance insights but does not explicitly compare to sibling tools or state when not to use it. No exclusions or alternatives are provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HYPD-AI/openai-ads-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server