Skip to main content
Glama

Link or unlink a Microsoft Advertising campaign and a shared budget

msads_set_campaign_budget_link
DestructiveIdempotent

Move a campaign onto a shared budget (attach), or give it its own daily budget again (detach). Attaching makes the campaign spend from the shared amount, so if that is more than double its current budget it needs allowLargeChange. Detaching needs the campaign's new own dailyBudget. Returns the previous setup so it can be restored. Use dryRun first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "campaignId": "<campaignId>",
      "action": "<action>"
    },
    "name": "msads_set_campaign_budget_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
dryRunNoPreview only. Microsoft has no validate-only mode, so Caybl reads the current value and shows exactly what would change (before and after) without sending anything. Free, and cannot affect spend.
accountIdNoMicrosoft Advertising account id or account number (e.g. 'F123ABCD'), as listed by msads_list_accounts. Only needed when the sign-in can reach more than one account.
campaignIdYesCampaign id, from msads_get_campaigns.
dailyBudgetNoFor detach: the campaign's own daily budget from now on.
sharedBudgetIdNoFor attach: the shared budget, from msads_get_budgets.
allowLargeChangeNoA change that more than doubles the current value is refused unless this is true. Set it only when the increase is deliberate and the user has confirmed it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / campaignId / pattern
      Added value: +"^\\d+$"
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations (destructive=true only signals risk) by disclosing the spend-level consequence of attaching, the >2x refusal rule that governs allowLargeChange, and that the call returns the previous setup so it can be restored. That reversibility and refusal behavior are exactly what an agent needs before mutating a live budget.

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?

Four short sentences, front-loaded with the two modes, then the consequence, the requirement, the return value, and the safety recommendation — nothing repeated from the schema verbatim and nothing wasted.

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?

For a destructive, 7-parameter mutation with no output schema, the description covers the branches, the return value and the dryRun path. It does not mention what happens to the shared budget itself when a campaign detaches, or any permission requirements, leaving a small gap.

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

Parameters4/5

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

Schema coverage is 86%, so the baseline is 3, but the description adds cross-parameter meaning the schema states only per-field: which parameter each action branch requires (sharedBudgetId for attach, dailyBudget for detach) and the conditional that triggers allowLargeChange. That conditional logic is genuine added value.

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?

Names the two concrete operations precisely — 'Move a campaign onto a shared budget (attach)' and 'give it its own daily budget again (detach)' — so the verb, resource and both modes are unambiguous. It does not explicitly name the closest sibling (msads_set_campaign_budget / msads_set_shared_budget_amount) to route the agent away, so it stops short of 5.

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?

Gives actionable preconditions: 'Use dryRun first', detach requires the campaign's new own dailyBudget, and attach needs allowLargeChange when the shared amount exceeds double the current budget. Missing is explicit guidance on when to prefer this over setting a campaign's own budget directly, so there is no stated exclusion.

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