Skip to main content
Glama
ZLeventer

google-ads-mcp

gads_impression_share

Analyze campaign impression share and identify if budget or Quality Score/bid is limiting reach by retrieving lost impression share metrics per campaign.

Instructions

Search Impression Share, Lost IS (Budget), and Lost IS (Rank) per campaign. Identifies whether budget or Quality Score/bid is limiting reach.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idNoOverride GOOGLE_ADS_CUSTOMER_ID for this call
start_dateNoStart date: YYYY-MM-DD, NdaysAgo, yesterday, or today28daysAgo
end_dateNoEnd date: YYYY-MM-DD, NdaysAgo, yesterday, or todayyesterday

Implementation Reference

  • Main handler function that executes the 'gads_impression_share' tool logic. Queries Google Ads API for impression share metrics per campaign including search impression share, budget lost IS, rank lost IS, exact match IS, content impression share, and content lost IS.
    export async function impressionShare(args: z.infer<z.ZodObject<typeof impressionShareSchema>>) {
      const customer = getCustomer(args.customer_id);
      const start = resolveDate(args.start_date);
      const end = resolveDate(args.end_date);
      const rows = await customer.query(`
        SELECT
          campaign.id,
          campaign.name,
          campaign.advertising_channel_type,
          metrics.search_impression_share,
          metrics.search_budget_lost_impression_share,
          metrics.search_rank_lost_impression_share,
          metrics.search_exact_match_impression_share,
          metrics.content_impression_share,
          metrics.content_budget_lost_impression_share,
          metrics.content_rank_lost_impression_share
        FROM campaign
        WHERE segments.date BETWEEN '${start}' AND '${end}'
          AND campaign.status = 'ENABLED'
        ORDER BY metrics.search_impression_share ASC
        LIMIT 200
      `);
      return { rowCount: rows.length, rows };
    }
  • Schema definition for the impression share tool. Extends baseArgs (customer_id, start_date, end_date) with Zod validation.
    export const impressionShareSchema = {
      ...baseArgs,
    };
  • src/index.ts:197-202 (registration)
    Registers the 'gads_impression_share' tool with the MCP server, binding the schema and handler function.
    server.tool(
      "gads_impression_share",
      "Search Impression Share, Lost IS (Budget), and Lost IS (Rank) per campaign. Identifies whether budget or Quality Score/bid is limiting reach.",
      impressionShareSchema,
      async (args) => { try { return ok(await impressionShare(args)); } catch (e) { return err(e); } }
    );
  • Shared baseArgs definition (customer_id, start_date, end_date) used by impressionShareSchema.
    const baseArgs = {
      customer_id: z.string().optional().describe("Override GOOGLE_ADS_CUSTOMER_ID for this call"),
      start_date: z.string().default(DEFAULT_START).describe("Start date: YYYY-MM-DD, NdaysAgo, yesterday, or today"),
      end_date: z.string().default(DEFAULT_END).describe("End date: YYYY-MM-DD, NdaysAgo, yesterday, or today"),
    };
Behavior3/5

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

No annotations provided, so the description carries full burden. It states the tool calculates impression share metrics and identifies limiting factors, but lacks mention of necessary permissions, data freshness, or any side effects, which is acceptable for a read-only query.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with essential information front-loaded, containing no superfluous words.

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?

The description explains the metrics returned but does not detail output format or granularity. Given no output schema and the tool's complexity (campaign-level data from Google Ads), more specifics would be beneficial but the core is covered.

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?

The input schema has 100% description coverage for all three parameters (customer_id, start_date, end_date). The description does not add meaning beyond what the schema provides, so baseline score of 3 is appropriate.

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?

The description clearly specifies the tool returns 'Search Impression Share, Lost IS (Budget), and Lost IS (Rank) per campaign' and identifies whether budget or Quality Score/bid is limiting reach, distinguishing it from sibling tools like gads_campaign_performance.

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

Usage Guidelines4/5

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

The description implies use for impression share diagnostics per campaign but does not explicitly contrast with alternatives or state when to avoid it, though the context is clear enough.

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/ZLeventer/google-ads-mcp'

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