Skip to main content
Glama

Attach or detach Microsoft Advertising extensions

msads_set_ad_extension_attachment
DestructiveIdempotent

Attach library extensions to a campaign or an ad group (they start serving there), or detach them (they stop serving there and stay in the library). Use ids from msads_get_ad_extensions. Attaching to an ad group overrides what the campaign has. Use dryRun first when unsure.

Input Schema

NameRequiredDescriptionDefault
actionYesattach = start serving, detach = stop serving.
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.
adGroupIdNoThe ad group to attach to or detach from (wins over campaignId).
campaignIdNoThe campaign to attach to or detach from.
extensionIdsYesExtension ids, from msads_get_ad_extensions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety bar is lower, but the description adds genuinely non-obvious semantics: detaching leaves the extension in the library rather than deleting it, and ad group attachment overrides campaign-level attachment. It does not discuss spend impact beyond the dryRun note or what a batch of 100 ids returns.

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, zero waste, with the core attach/detach semantics and the resulting serving effect front-loaded before the operational hints.

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?

A destructive, batch-capable mutation tool with no output schema is adequately covered: action meaning, id sourcing, dryRun escape hatch, and override rule are all present. Only the absence of any statement about return/error behavior for partial batch failures keeps it below 5.

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% and every parameter already carries a description, including the dryRun preview semantics and the adGroupId-wins-over-campaignId precedence. The description's only additive parameter note is the sourcing of extensionIds, which the schema also states, so baseline 3 applies.

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?

Specific verb pair (attach/detach) plus precise resource (library extensions) and target (campaign or ad group), with an explicit statement of the resulting behavior ('they start serving there'). Clearly separable from msads_add_ad_extensions (creation) and msads_get_ad_extensions (lookup).

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?

Routes the agent to msads_get_ad_extensions for ids and advises 'Use dryRun first when unsure', plus the precedence rule that ad group attachment overrides campaign. Strong contextual guidance, though it never states when this tool is the wrong choice versus sibling tools like msads_add_ad_extensions.

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