Skip to main content
Glama

Ad Spec Guard

validate_ad_copy

Read-only

Check drafted ad copy against the hard character limits of one platform, field by field, and report which fields exceed the limit and by how much. Use it on every draft before presenting it, because copy over the limit is rejected when the ad is uploaded, not when it is written.

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": {
      "platform": "<platform>",
      "fields": "<fields>"
    },
    "name": "validate_ad_copy"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldsYesMap of field name to the drafted text, for example {"headline": "Same day delivery", "description": "..."}. Call get_platform_specs for the field names a platform accepts.
languageNoLanguage tag of the copy. Characters are counted as code points.en
platformYesAd platform. One of: google, linkedin, meta, microsoft, telegram, tiktok.
campaign_typeNoOptional campaign type, for example 'search' or 'performance_max'. Recorded in the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare it a safe, non-destructive, closed-world read, so the safety profile is covered. The description still adds real value beyond them: it describes the result shape (per-field exceedance and overage amount) and the downstream failure mode that makes the check matter, which no annotation conveys.

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?

Two sentences with zero waste: the first front-loads what the tool does and returns, the second front-loads the when-to-use rule before its justification. Nothing is repeated from the schema or annotations.

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?

A simple, non-destructive validation tool with no output schema and fully documented parameters — the description covers purpose, trigger, and result contents without needing to restate the schema. An agent has everything required to call it correctly at the right moment.

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%, with each parameter documented including the fields map, its example, the platform enum, and the note that campaign_type is merely recorded. The description adds only a loose 'field by field' / 'one platform' framing on top of that, so the baseline 3 applies.

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 a specific verb and resource (check drafted ad copy) and narrows the scope to 'hard character limits of one platform, field by field,' with the result defined as which fields exceed and by how much. That specificity implicitly separates it from policy or creative-spec validators, but no sibling (e.g. check_ad_policy_preflight) is named or explicitly excluded.

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 clear trigger — 'use it on every draft before presenting it' — plus the reason: over-limit copy is rejected at upload, not at write time. It stops short of stating when NOT to use it or which sibling to pick when the concern is policy rather than length.

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.