Skip to main content
Glama

Google Ads: add negative keywords

add_negative_keywords

Adds negative keywords to a campaign to block irrelevant traffic.

Negative keywords prevent your ads from showing for specific search terms.
remove_negative_keywords takes them back out, given the same keywords.

Args:
    customer_id: The Google Ads customer ID (numbers only, no hyphens).
    campaign_id: The ID of the campaign to add negative keywords to.
    keywords: List of keyword objects, each with:
        - text: The keyword text (e.g., "free LMS").
        - match_type: One of: EXACT, PHRASE, BROAD. Default: BROAD.

Returns:
    Dictionary with created negative keyword resource names.

Tools revision: d80f65c0.

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": {
      "customer_id": "<customer_id>",
      "campaign_id": "<campaign_id>",
      "keywords": "<keywords>"
    },
    "name": "add_negative_keywords"
  }
}

Input Schema

NameRequiredDescriptionDefault
keywordsYes
campaign_idYes
customer_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, openWorld=false, and idempotent=false, so the safety profile is covered. The description adds value beyond that by explaining the actual effect (ads stop showing for the specified terms) and by pointing to the exact reversal tool with the same keywords, which is the key operational context for a mutation. It does not address duplicate handling or whether changes apply immediately.

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?

Front-loaded one-liner followed by a short rationale, the inverse tool, Args, and Returns — a clean and scannable structure. The second sentence ('Negative keywords prevent your ads from showing for specific search terms') largely restates 'block irrelevant traffic,' a small redundancy.

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?

An output schema exists, so the Returns block is somewhat redundant, but the definition otherwise covers everything needed to call it: parameter formats, match-type values, default, and the undo path. Minor omissions remain around duplicate keywords, batch limits, and whether campaign_id must belong to the given customer_id.

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 0% and the keywords array items are untyped additionalProperties, so the description is the only source of meaning. It documents all three required parameters, specifies customer_id formatting (numbers only, no hyphens), and supplies the match_type enum values EXACT/PHRASE/BROAD plus the BROAD default — none of which exist in the schema.

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+resource+scope: 'Adds negative keywords to a campaign.' The phrase 'to a campaign' implicitly separates it from account-level and shared-list siblings, but the description never names add_account_negatives or add_to_negative_keyword_list, which are the closest ambiguous alternatives.

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

Usage Guidelines3/5

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

It gives the conceptual purpose (block irrelevant traffic) and names remove_negative_keywords as the inverse operation, which is real routing help. It does not say when to prefer this over add_account_negatives, add_to_negative_keyword_list, or attach_negative_keyword_list, so the agent must infer scope selection.

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