Skip to main content
Glama

repair_ad

Destructive

Repair an ad — rebuild its internal profiles, clear its cache and re-export. Ads are product-listing channels (Google Shopping, Meta catalog, Microsoft, price comparison) for the merchant's physical products, not marketplaces: they publish products to the channel and have no order sync. Use this when an ad is in a broken or inconsistent state. Returns {integrationId, action:'repair', status:'repaired', kind:'ads', message}. ad_id is from list_ads. project_id is OPTIONAL (inferred for a single-project customer; project_id_required otherwise — then call list_projects). Re-export replaces generated output and can publish through an active automatic integration. Confirm with the user before repair; do not retry blindly.

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

Input Schema

NameRequiredDescriptionDefault
ad_idYes
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, idempotentHint=false and openWorldHint=true, but the description goes further by naming exactly what is destroyed ("Re-export replaces generated output") and disclosing the side effect of publishing through an active automatic integration. It also supplies the return shape ({integrationId, action, status, kind, message}) in the absence of an output schema.

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?

The action and its mechanics are front-loaded, and each sentence carries operational weight (definition, trigger, return shape, parameter sourcing, safety warning). It is dense and slightly packed into long clauses, but no sentence is filler.

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?

For a destructive, non-idempotent, open-world mutation with no output schema and no parameter descriptions, everything an agent needs is present: what it does, when to call it, confirmation policy, parameter sourcing and fallbacks, side effects, and the response shape.

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 description coverage is 0%, so the description must carry the burden and does: ad_id's provenance (list_ads) and project_id's optionality, inference rule, and error-driven recovery path (project_id_required → list_projects) are all documented. Neither parameter's semantics could be inferred from the bare integer schema.

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 ("Repair an ad") and then enumerates the concrete operations: rebuild internal profiles, clear cache, re-export. It also defines what an ad is (a product-listing channel, not a marketplace), which separates it from the sibling repair_marketplace without the agent needing to open either schema.

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

Usage Guidelines5/5

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

Explicit trigger is given ("Use this when an ad is in a broken or inconsistent state"), along with cautionary guidance ("Confirm with the user before repair; do not retry blindly"). Prerequisite routing is also covered: ad_id comes from list_ads, and project_id is optional with a documented fallback to list_projects when project_id_required is raised.

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