Skip to main content
Glama

map_ad_attribute

Idempotent

Set where ONE of an ad's output attributes gets its value — the write half of solving the attribute form. Target the output attribute by code (from get_ad_attributes). Set platform_code to a source attribute (from list_source_attributes) to map it, and/or constant for a fixed value; default_platform_code / default_constant are the fallback used when the primary source is empty. For an IDENTIFIER (sku, gtin/ean/barcode, mpn), first confirm the chosen source is actually populated across the catalog (get_project_profile eanFillRate; page preview_products) — mapping or requiring an identifier the products lack yields an empty, non-functional integration. rule_id attaches an Attribute Rule (from list_rules / create_rule) — the value is then computed by that rule; send rule_id:"" to detach it, and rule_enabled:false to attach it disabled. To re-enable an attached-but-disabled rule, send rule_enabled:true (with or without its rule_id, from get_ad_attributes). rule_enabled on its own applies to whatever rule is already attached; with none attached it is rejected as unknown_rule. Provide at least one field (send an empty string to clear a text field). rule_id together with platform_code/constant in the same call is contradictory and is rejected. Setting a source (platform_code/constant) on an attribute that currently has a rule DETACHES that rule (mutually exclusive; changed then includes rule_id). SAVE + REBUILD: the mapping is written to the integration and its built feed is rebuilt immediately, but reaching the ad platform still needs a re-export/submit — call repair_ad or run_ad_operation (submit_all) afterwards (auto-pilot ads re-export on their next sync). Map only attributes returned by get_ad_attributes; hidden ones are internal and cannot be mapped by regular users. Returns {integrationId, code, status, changed:[...], reason, rebuilt, overridesStepField}; status is 'updated' | 'no_changes' | When the attribute was already driven by a wizard step field, the response says so in overridesStepField: the rewrite rule beats that step for good, so a later change in the step has no effect. If the step already sets the right source, change it there instead of mapping here. 'rejected' (reason: unknown_attribute | unknown_source_attribute | value_not_allowed | unknown_rule). Category-specific attributes are mapped here too, the same way — but they only exist after a category is mapped, so run refresh_ad_category_attributes first (they then appear in get_ad_attributes). ad_id is from list_ads. project_id is OPTIONAL (inferred for a single-project customer).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
ad_idYes
rule_idNo
constantNo
project_idNo
rule_enabledNo
platform_codeNo
default_constantNo
default_platform_codeNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Though annotations already indicate a non-read-only, idempotent write operation, the description goes far beyond them. It discloses that the mapping writes to the integration and rebuilds the feed immediately but still requires a separate re-export to reach the ad platform. It details the exact status response values, the behavior of overridesStepField (including that the rewrite rule permanently overrides a wizard step), the mutual exclusivity of rule with platform_code/constant leading to detachment, and the rejection of rule_enabled alone with no attached rule. All this is invaluable for correct invocation and interpretation of results.

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?

The description is long but every sentence earns its place. It is front-loaded with the core purpose, then systematically covers parameters, rules, save/rebuild behavior, response statuses, and edge cases. There is no filler or repetition; the information density is high while remaining logically ordered. For a tool with 9 parameters and many interdependencies, this length is justified and could not be significantly shortened without losing critical guidance.

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?

Given the tool's complexity and the absence of an output schema, the description is exceptionally complete. It explains the return object (including status values and overridesStepField), prerequisites, the distinction between hidden and mappable attributes, the special handling of identifiers with eanFillRate, and the follow-up actions required for re-export. The agent has everything needed to call this correctly without any additional lookups.

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?

With schema description coverage at 0%, the description fully carries the parameter documentation. It explains every parameter explicitly: code (from get_ad_attributes), platform_code (source attribute), constant (fixed value), default_platform_code / default_constant (fallbacks), rule_id (attachment/detachment), rule_enabled (enable/disable), project_id (optional, inferred for single-project), and ad_id (from list_ads). It also clarifies the interplay between rule_id and platform_code/constant and the condition for providing at least one field. This is complete and handles the 0% coverage gap perfectly.

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?

The description opens with a precise statement of what the tool does: 'Set where ONE of an ad's output attributes gets its value — the write half of solving the attribute form.' It names the specific verb ('Set'), the target resource ('an ad's output attribute'), and immediately distinguishes it from the read side by referencing get_ad_attributes. This clearly separates it from sibling tools like get_ad_attributes and map_feed_attribute.

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?

The description provides extensive usage guidance: it states when to use the tool (the 'write half' of attribute mapping) and when not to ('If the step already sets the right source, change it there instead of mapping here'). It also prescribes the required prerequisites (get_ad_attributes, list_source_attributes) and even tells the agent to run refresh_ad_category_attributes first for category-specific attributes. It explicitly names alternative actions like repair_ad or run_ad_operation for the re-export step that follows.

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.

TDQS

A4.2/5.0
Disambiguation4/5

Tools are organized around distinct resources (ads, marketplaces, feeds, orders, rules, sources) with clear action verbs, and descriptions explicitly disambiguate near-pairs like get_feed_status vs ad_status or set_feed_filter vs set_feed_attribute_filter. A few similarly named status/action pairs (e.g. ad_status vs get_ad, run_ad_item_action vs run_ad_operation) require careful reading, but overall the purposes are separable.

Naming Consistency4/5

The overwhelming majority follow a consistent verb_noun snake_case pattern (list_*, get_*, create_*, set_*, run_*, test_*). Minor deviations like ad_status and marketplace_status (noun-based status tools) and koongo_knowledge break the pattern slightly, but the convention is clearly recognizable and predictable.

Tool Count1/5

At 105 tools, the surface is extreme and far beyond the 50+ threshold, even for a complex e-commerce integration domain. Much of the bloat comes from systematic triplication across ads, marketplaces, and feeds (e.g. three nearly identical map_*_attribute tools, three list_*_items, three get_*_report) that a generic resource parameter could have consolidated.

Completeness4/5

The toolset covers the full lifecycle of feeds, ads, marketplaces, order connections, rules, and imports, including create/read/update/delete, status monitoring, item-level actions, validation, repair, and restore. Minor gaps exist, such as no delete for standalone order connections and limited update capabilities for some entities, but these are workable and do not create dead ends for the core workflows.

Resources