Skip to main content
Glama

Add Microsoft Advertising negative keywords

msads_add_negative_keywords
Idempotent

Add negative keywords to a campaign or an ad group, so ads stop showing for those searches (the usual fix for wasted spend found with msads_get_search_terms). Exact blocks only that search, Phrase blocks searches containing the words in order, Broad blocks searches containing all the words in any order - Exact is the safe default. Up to 50 per call; ones already present are skipped. Adding negatives can reduce traffic, so check the list with dryRun when unsure. Needs campaignId for an ad group as well as the ad group id.

Input Schema

NameRequiredDescriptionDefault
levelYesWhere the negatives apply.
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.
entityIdYesThe campaign id (level campaign) or ad group id (level adGroup).
keywordsYesThe words or phrases to block, one per item.
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.
matchTypeNoExact (default), Phrase or Broad.Exact
campaignIdNoRequired when level is adGroup: the ad group's campaign.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and a non-destructive write, and the description confirms the duplicate-skip behavior while adding the real caveat that negatives reduce traffic. It also explains the 50-per-call limit and that dryRun is a read-then-diff since Microsoft has no validate mode. Return shape is not described, but no output schema exists.

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?

One dense but well-ordered passage: what it does, then match-type semantics, then limits and dedupe, then the dryRun safety note, then the campaignId gotcha. Every sentence carries operational value, though the match-type clause runs long.

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?

Given 7 params, one open-world write and no output schema, the description covers the risky parts an agent needs: dedupe, per-call cap, traffic impact, preview path, and the ad-group campaignId dependency. Only the post-call result is left implicit.

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%, so the schema already documents level, entityId, matchType, dryRun and the 50-item cap. The description's main addition is the behavioral meaning of each match type and the recommendation that Exact is the safe default, which is useful but largely mirrors the enum description.

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?

States a specific verb (add) and resource (negative keywords) with the target scope (campaign or ad group), and ties itself to the upstream sibling msads_get_search_terms. It does not explicitly distinguish itself from the sibling add_ad_group_negative_keywords, which appears to cover a narrower slice of the same job.

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 a concrete trigger (wasted spend surfaced by msads_get_search_terms) and a safety route (use dryRun when unsure). It also flags the campaignId-for-adGroup requirement. It stops short of saying when to prefer the narrower add_ad_group_negative_keywords sibling.

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