Skip to main content
Glama

Draft a custom segment

draft_custom_segment

Draft a custom segment from URLs and search terms — returns a PREVIEW.

A custom segment reaches people who browse sites like the URLs or who search for / are interested in the terms (any of them: members are OR-ed). Custom segments cannot be attached to Search campaigns; in Demand Gen they are used inside an audience (draft_demand_gen_audience). The applied result returns custom_audience_id for draft_demand_gen_audience.

Google Ads API: https://developers.google.com/google-ads/api/docs/start

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": {
      "name": "<name>"
    },
    "name": "draft_custom_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesSegment name, unique in the account.
urlsNoWebsites the audience browses, e.g. competitor sites.
keywordsNoTerms the audience searches for or is interested in (at most 10 words and 80 characters each).
customer_idNoGoogle Ads customer ID (digits, dashes optional). Defaults to the configured account.
descriptionNoOptional description.
segment_typeNoAUTO (default; Google decides between interest and search intent) or SEARCH (people who searched the terms on Google).AUTO

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, and the description resolves the ambiguity that matters most: this produces a PREVIEW rather than an applied entity, and the applied artifact surfaces as custom_audience_id via draft_demand_gen_audience. That is genuine added context, but nothing is said about what the preview contains, whether drafts persist, or any account/permission prerequisites.

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 with the action and the PREVIEW outcome in one line, then supporting semantics and constraints. The Google Ads API documentation link is filler, and there are two dense paragraphs where the key exclusion could be a standalone line.

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?

With an output schema present, return values need no explanation, and the description nonetheless covers the draft-to-apply handoff. For a 6-parameter drafting tool with full schema coverage and annotations, an agent has everything needed to call it and know what to do next.

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 description coverage is 100%, so the baseline is 3; the description earns above that by disclosing the combination semantics the schema omits — members across urls and keywords are OR-ed, not intersected. It does not clarify how segment_type interacts with the URL/keyword inputs, which is the one remaining semantic gap.

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 and resource ("Draft a custom segment from URLs and search terms") and immediately pins down the output modality ("returns a PREVIEW"), then defines what the segment actually targets. The definition of OR-ed membership makes the resource semantics unambiguous, which distinguishes it from sibling drafting tools like draft_ga4_audience or draft_reddit_custom_audience.

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 an explicit when-not ("Custom segments cannot be attached to Search campaigns") and names the downstream consumer (draft_demand_gen_audience), which is real routing guidance. It stops short of stating when to prefer this over other audience-drafting siblings, so it is clear context rather than a full when/when-not/alternatives matrix.

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.