Skip to main content
Glama
ZLeventer

google-ads-mcp

gads_list_budgets

List all Google Ads campaign budgets, showing daily/total amount, delivery method (STANDARD/ACCELERATED), period, and whether a recommended budget exists.

Instructions

All campaign budgets with daily/total amount, delivery method (STANDARD/ACCELERATED), period, and whether a recommended budget exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idNoOverride GOOGLE_ADS_CUSTOMER_ID for this call

Implementation Reference

  • The main handler function for gads_list_budgets. It queries Google Ads API for enabled campaign budgets, enriches the results with dollar amounts (converted from micros), and returns the row count and rows.
    export async function listBudgets(args: z.infer<z.ZodObject<typeof listBudgetsSchema>>) {
      const customer = getCustomer(args.customer_id);
      const rows = await customer.query(`
        SELECT
          campaign_budget.id,
          campaign_budget.name,
          campaign_budget.amount_micros,
          campaign_budget.delivery_method,
          campaign_budget.period,
          campaign_budget.status,
          campaign_budget.type,
          campaign_budget.total_amount_micros,
          campaign_budget.reference_count,
          campaign_budget.has_recommended_budget,
          campaign_budget.recommended_budget_amount_micros
        FROM campaign_budget
        WHERE campaign_budget.status = 'ENABLED'
        ORDER BY campaign_budget.amount_micros DESC
        LIMIT 200
      `);
      const enriched = rows.map((r: any) => ({
        ...r,
        campaign_budget: {
          ...r.campaign_budget,
          amount_dollars: microsToDollars(r.campaign_budget?.amount_micros),
          recommended_budget_dollars: microsToDollars(r.campaign_budget?.recommended_budget_amount_micros),
        },
      }));
      return { rowCount: enriched.length, rows: enriched };
    }
  • Input schema for gads_list_budgets. Accepts an optional customer_id to override the default GOOGLE_ADS_CUSTOMER_ID.
    export const listBudgetsSchema = {
      customer_id: z.string().optional().describe("Override GOOGLE_ADS_CUSTOMER_ID for this call"),
    };
  • Helper function microsToDollars converts micro-amounts (integer/string) to dollar amounts (divided by 1,000,000).
    function microsToDollars(micros: number | string | undefined): number {
      const n = Number(micros ?? 0);
      return Number.isFinite(n) ? n / 1_000_000 : 0;
    }
  • src/index.ts:213-218 (registration)
    Registration of the gads_list_budgets tool with the MCP server, binding the name, description, schema, and handler.
    server.tool(
      "gads_list_budgets",
      "All campaign budgets with daily/total amount, delivery method (STANDARD/ACCELERATED), period, and whether a recommended budget exists.",
      listBudgetsSchema,
      async (args) => { try { return ok(await listBudgets(args)); } catch (e) { return err(e); } }
    );
Behavior3/5

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

No annotations provided; description implies read-only via 'list' but does not explicitly state safety, permissions, or scope (e.g., whether it returns all budgets for a customer or account).

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?

Single sentence conveys core information efficiently. Slightly dense but not overly long; no wasted text.

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?

With no output schema, description lists return fields, which is helpful. However, it omits return type (array/object), pagination, and filtering options, leaving gaps for a list endpoint.

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 coverage is 100% for the single parameter (customer_id), but description adds no semantics beyond the schema's 'Override GOOGLE_ADS_CUSTOMER_ID'. Baseline of 3 applies.

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?

The description clearly states the tool lists campaign budgets with specific fields (daily/total amount, delivery method, period, recommended budget). It distinguishes from sibling gads_budget_pacing by listing unique return fields.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus siblings like gads_budget_pacing or gads_list_campaigns. Agent must infer use case from field list.

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