Skip to main content
Glama

Metadata MCP Connector

Create or Update Budget Group

create_budget_group
Destructive

Create or update advertising budget and spending allocation. Set up budget groups to control how much money campaigns can spend. ALSO KNOWN AS: set budget, allocate spend, create spending plan, budget allocation, ad budget, campaign budget

            KEYWORDS: budget, spend, spending, money, dollars, $, quarter, monthly, allocation, cost, funds, cap, limit

            CREATION TYPES (these are not required for cap-only updates):
            - Lead Generation (default): goal=CPL, groupMetric=CPL, optimizerFormula=CPL_2 (or CPC_2), autoPauseConfigurationId=14, enableBooster=true. Requires benchmark and groupMetric. Dates follow budgetType, not the goal (see DATE RULES): FIXED_BUDGET sends startDate AND endDate, MONTHLY_RESET sends neither.
              • MQL variant (the plan's KPI is MQLs / cost per MQL): goal=CPL, groupMetric=CPMQL, optimizerFormula=MQL, benchmark = the cost-per-MQL target. MQL is NOT a value of goal or groupMetric; the platform rejects it. Keep the CPL goal and express MQL through groupMetric=CPMQL + optimizerFormula=MQL.
              • Influenced-opportunity variant: goal=CPL, groupMetric=CPL, optimizerFormula=INFLUENCED_OPP. This is a supported platform formula, not cost per lead. Preserve it on existing groups.
            - Brand Awareness: goal=CTR, autoPauseConfigurationId=9, enableBooster=false, budgetType=MONTHLY_RESET. Two formula variants:
              • CPC variant: groupMetric=CPC, optimizerFormula=CPC_2 (benchmark is a CPC target, e.g. 10)
              • CTR variant: groupMetric=CTR, optimizerFormula=CTR (benchmark is a CTR target in basis-points style, e.g. 10000)
              budgetRedistributionStrategy may be PERFORMANCE or PACING_ONLY. MONTHLY_RESET: omit BOTH startDate and endDate.

            WARNING: BUDGET-GROUP TYPE MUST FOLLOW THE CAMPAIGN GOAL (do not mix):
            - A CPL / Lead Generation campaign (campaignType "Lead Gen") REQUIRES a compatible Lead Generation budget group with goal=CPL. Its confirmed optimization metric and formula follow the selected variant above; cap-only updates preserve the existing variant.
            - A Brand Awareness campaign (campaignType "Brand Awareness") REQUIRES a Brand Awareness budget group: goal=CTR, enableBooster=false, budgetType=MONTHLY_RESET, autoPauseConfigurationId=9 (CPC or CTR formula variant per SUPPORTED TYPES above).
            - NEVER attach a Brand-Awareness (CTR) budget group to a CPL campaign, or a Lead-Generation (CPL) budget group to a Brand Awareness campaign — the optimizer goal must match the campaign's objective. If the campaign goal is unknown, confirm it before creating the budget group.

            MONTHLY CAP ONLY: use data containing only id and monthlyCap, e.g.
            {"id": 16900, "monthlyCap": 5000}. Read the exact existing group first.
            This update preserves its saved optimizerFormula, goal, metric,
            benchmark, booster, funnels, dates and campaign membership, including
            INFLUENCED_OPP and formulas outside the creation choices below.
            Do not resend creation defaults or convert the group to CPL or MQL.
            A zero cap is allowed, but the platform rejects caps below already-spent
            money; report that failure without changing optimization or bypassing it.
            Verify budget_update_verification.verified before claiming success or
            continuing to another group. If false, stop without retry or rollback.

            To UPDATE other settings: include 'id' with the budget group ID.
            To CREATE: omit the 'id' field.
            Pass all fields inside the `data` object. Dates must be ISO 8601 UTC with exactly 3 ms digits, e.g. 2026-01-15T12:00:00.000Z (format example only — compute the real values).

            DATE RULES FOR CREATION OR EXPLICIT SCHEDULE CHANGES:
            Cap-only updates preserve stored dates, including historical dates;
            do not replace them with a new flight or apply creation date rules.
            - startDate and endDate travel TOGETHER: send both or neither. The platform rejects one without the other with 400 VALIDATION_DATE ("End Date can not be empty" / "Start Date can not be empty"). budgetType decides which: FIXED_BUDGET = both required; MONTHLY_RESET = omit both. This holds for EVERY goal, CPL included: a Lead Gen group with a monthly budget is MONTHLY_RESET with no dates at all, never MONTHLY_RESET plus a startDate.
            - You do NOT inherently know today's date. If you are not already certain of it, call get_current_date FIRST and anchor every rule below to that real value — never guess.
            - The endDate MUST ALWAYS be in the future (strictly after today's real date).
            - NEVER set an endDate that is today or in the past — this will cause the budget group to be immediately expired.
            - "this month" → endDate = the last day of the current month. "this quarter" → endDate = the last day of the current quarter. "next month" / "next quarter" → compute relative to today's real date.
            - If the user provides a specific end date that is in the past, WARN THEM and ask for a valid future date. Do NOT submit a past endDate.
            - startDate can be today or in the future, but never in the past for new budget groups.

            REMARKS:
            - If the user doesn't EXPLICITLY states that their budget is by month or MONTHLY, then use FIXED_BUDGET as budgetType.
            - In other words, the default value is FIXED_BUDGET unless the user explicitly says MONTHLY or BY MONTH.
            - IF the user says "this month" then also use FIXED_BUDGET and start date should be today, end date should be the last day of the month.
            - When you use FIXED_BUDGET (fixed-date) but the user's timing expectations/goals are NOT clear, ASK for an explicit start-date and end-date before creating — do not silently invent a date range. Only skip the question when the dates are already unambiguous (e.g. the user gave a range, or said "this month"/"this quarter").
            - monthlyCap is the user's money: when the user has NOT explicitly stated a budget / monthly cap (or confirmed a figure you proposed), ASK for it before creating — do not silently invent a cap. This applies to campaign-creation flows too: a budget group needed by a new campaign still requires a user-chosen cap. Same when an update would change monthlyCap.
            - If the user says "set a monthly budget of $X" or equivalent then use MONTHLY_RESET as budgetType (MONTHLY is NOT a valid value, the platform rejects it)
            - Before an update, refresh the information by using get_budget_group to avoid overwriting fields unintentionally.
            - The campaign doesn't need to be in a launched state for its budget group to be updated.

            WHEN TO USE:
            - User wants to create a new budget group with specific settings
            - We're creating a campaign and need to set up its budget group.
            - User requests to update an existing budget group with new parameters
            - User requests to update the budget of a campaign

            INTEGRATION WITH OTHER TOOLS:
            - If the ID for a budget group update is unknown there are a few options:
              - if you have the campaign name, use search_campaigns_by_name. In its response, `$.optimizationGroup.id` is the budget group ID.
                - From search_campaigns_by_names's response, you get the property `$.optimizationGroup.id`. That's the budget group ID.
            - You can also use get_budget_group if you have the budget group name to retrieve its ID.

            Anchor every date calculation to the REAL current date — if you are not certain what today is, call get_current_date before computing start/end dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesBudget group configuration

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / data / anyOf
      Added value: +[
      +  {
      +    "minProperties": 2,
      +    "required": [
      +      "id"
      +    ]
      +  },
      +  {
      +    "not": {
      +      "required": [
      +        "id"
      +      ]
      +    },
      +    "properties": {
      +      "monthlyCap": {
      +        "minimum": 1
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "budgetType",
      +      "monthlyCap",
      +      "goal",
      +      "budgetRedistributionStrategy"
      +    ]
      +  }
      +]
    • addedInput schema / properties / data / properties / id / minimum
      Added value: +1
    • changedInput schema / properties / data / properties / monthlyCap / description
      Previous value: -"Monthly spending cap in USD"New value: +"User-confirmed monthly spending cap in USD. Zero is allowed on updates, subject to the platform's already-spent guard."
    • changedInput schema / properties / data / properties / monthlyCap / minimum
      Previous value: -1New value: +0
    • removedInput schema / properties / data / properties / optimizerFormula / default
      Removed value: -"CPL_2"
    • changedInput schema / properties / data / properties / optimizerFormula / description
      Previous value: -"CPL_2 (or CPC_2) for Lead Gen; MQL for an MQL-optimized Lead Gen group (with groupMetric=CPMQL); CPC_2 or CTR for Brand Awareness."New value: +"CPL_2 (or CPC_2) for Lead Gen; MQL for an MQL-optimized Lead Gen group (with groupMetric=CPMQL); CPC_2 or CTR for Brand Awareness. INFLUENCED_OPP for influenced-opportunity optimization with goal=CPL. Omit on cap-only updates to preserve the stored formula."
    • changedInput schema / properties / data / properties / optimizerFormula / enum
      Previous value: -[
      -  "CPL_2",
      -  "MQL",
      -  "CPC_2",
      -  "CTR"
      -]New value: +[
      +  "CPL_2",
      +  "MQL",
      +  "CPC_2",
      +  "CTR",
      +  "INFLUENCED_OPP"
      +]
    • removedInput schema / properties / data / required
      Removed value: -[
      -  "name",
      -  "budgetType",
      -  "monthlyCap",
      -  "goal",
      -  "budgetRedistributionStrategy"
      -]
  2. Changed6 schema fields changed
    • changedInput schema / properties / data / properties / goal / description
      Previous value: -"Optimization goal. CPL/MQL for Lead Gen; CTR for Brand Awareness."New value: +"Optimization goal. CPL for Lead Gen (MQL-optimized groups included); CTR for Brand Awareness."
    • changedInput schema / properties / data / properties / goal / enum
      Previous value: -[
      -  "CPL",
      -  "MQL",
      -  "CTR"
      -]New value: +[
      +  "CPL",
      +  "CTR"
      +]
    • changedInput schema / properties / data / properties / groupMetric / description
      Previous value: -"Group metric. CPL/MQL for Lead Gen; CPC or CTR for Brand Awareness (match optimizerFormula)."New value: +"Group metric. CPL (cost per lead) or CPMQL (cost per MQL) for Lead Gen; CPC or CTR for Brand Awareness (match optimizerFormula)."
    • changedInput schema / properties / data / properties / groupMetric / enum
      Previous value: -[
      -  "CPL",
      -  "MQL",
      -  "CPC",
      -  "CTR"
      -]New value: +[
      +  "CPL",
      +  "CPMQL",
      +  "CPC",
      +  "CTR"
      +]
    • changedInput schema / properties / data / properties / optimizerFormula / description
      Previous value: -"CPL_2/CPC_2 for Lead Gen; CPC_2 or CTR for Brand Awareness."New value: +"CPL_2 (or CPC_2) for Lead Gen; MQL for an MQL-optimized Lead Gen group (with groupMetric=CPMQL); CPC_2 or CTR for Brand Awareness."
    • changedInput schema / properties / data / properties / optimizerFormula / enum
      Previous value: -[
      -  "CPL_2",
      -  "CPC_2",
      -  "CTR"
      -]New value: +[
      +  "CPL_2",
      +  "MQL",
      +  "CPC_2",
      +  "CTR"
      +]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare readonly=false, destructive=true, openWorld=true, but the description adds much more: goal/campaign compatibility constraints, cap-only update preservation semantics, already-spent cap rejection, zero-cap allowance, and the budget_update_verification.verified gate with stop-without-retry behavior. This is far beyond what the annotations convey.

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

Conciseness3/5

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

Front-loaded purpose is good and rules are organized into labeled sections, but the definition is a monolith bloated by search-oriented artifacts ('ALSO KNOWN AS', 'KEYWORDS') and duplicated campaign-name retrieval instructions. Several sentences do not earn their place for an agent already reading the structured schema.

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 complex nested mutation tool with no output schema, the description covers creation variants, update preservation, date computation, verification, and failure handling comprehensively. Nothing material an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so baseline 3, but the description substantially enriches semantics: id-optional-for-create, the meaning of goal/groupMetric/optimizerFormula combinations, monthlyCap as user-confirmed money, and date/startDate-endDate pairing rules per budgetType. It explains field relationships the schema cannot express.

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 ('Create or update advertising budget and spending allocation') and names both create and update modes explicitly. An agent can distinguish it from get_budget_group and list_budget_groups siblings, which are read-only retrievals.

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?

Has an explicit WHEN TO USE block covering creation, campaign-needed setup, and updates, plus INTEGRATION WITH OTHER TOOLS routing (search_campaigns_by_names → $.optimizationGroup.id, get_budget_group, get_current_date). It also states prerequisite checks and when to ask the user rather than guess dates/caps.

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