Skip to main content
Glama

set_api_source

Store per-product values that YOU (the client's own model) computed, as a new 'API source' attribute — written straight into the project's data store (no CSV, no join handle) — so a feed rule can read the attribute directly instead of matching free text with contains/conditions. PREFER this whenever a rule would otherwise need a long or complex condition tree. Typical flow: call preview_products to read products, derive ONE value per product with your own reasoning (e.g. the color, gender, or material from the title/description), then call this with values as a JSON OBJECT (not an array) mapping each product's id (the id field from preview_products) to the computed value. Values keep their JSON type — send a NUMBER for a numeric attribute (so numeric rule operators work), a boolean, or a string; a null clears that product. code is the new attribute name (e.g. "ai_color"); once applied it becomes the source attribute api_source. (visible in list_source_attributes). Send large catalogs in BATCHES: first batch mode:"replace", following batches mode:"append"; set apply:true on the LAST batch only, to materialize (this re-imports so the values land on products — an ASYNCHRONOUS import). VERIFY before using it: poll get_import_status until the newest api_source run in recentRuns has running:false and status 'ok', and the code appears in list_source_attributes; only THEN attach the attribute to a feed with map_feed_attribute or reference api_source. in a rule (create_rule / update_rule). If that run errors, run_import retries without re-sending the values. code must not collide with an existing source attribute of another class. project_id is OPTIONAL (inferred for a single-project customer). Requires the additional-sources addon: without it the call is refused with error 'addon_required' (HTTP 403) + addonCode + upsellUrl — show the user the upsellUrl so they can unlock it, and do not retry. Returns {status:'written'|'applied', code, valueCount, applied}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
modeNo
applyNo
valuesYes
project_idNo

TDQS

A5/5.0
Behavior5/5

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

The description goes well beyond the minimal annotations, disclosing that this is a write that re-imports asynchronously, that apply:true materializes values, that verification via get_import_status is required, that an errored import can be retried with run_import without resending values, and that the addon_required error returns upsellUrl with HTTP 403. No contradiction with the annotations exists.

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 densely packed and well structured: purpose, preference, workflow, value format, batching, verification, prerequisites, error handling, and return shape follow in logical order. Each sentence carries operational weight, and the main purpose and preference are front-loaded.

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 tool with no output schema, minimal annotations, and a nontrivial multi-step batching lifecycle, the description is remarkably complete: it covers the full call sequence, verification steps, asynchronous behavior, error/upsell handling, addon requirement, return object shape, and post-condition usage with related tools. Nothing essential is missing.

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 carries the full burden, and it succeeds: `values` is explained as a JSON object keyed by preview_products id with JSON-type preservation and null-clearing; `code` is the attribute name and must not collide; `mode` is tied to batching; `apply` is tied to the last batch; `project_id` is optional and inferred. Every parameter receives operational meaning beyond the 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?

The description opens with a precise verb and resource: 'Store per-product values ... as a new API source attribute'. It also clarifies the purpose by contrasting with condition-tree matching and naming the resulting attribute namespace api_source.<code>, which distinguishes it conceptually from the AI-source siblings.

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?

It explicitly says 'PREFER this whenever a rule would otherwise need a long or complex condition tree' and gives a complete usage flow: preview_products, derive values, batch with replace/append, apply on the last batch, verify with get_import_status, then use map_feed_attribute or create_rule/update_rule. It also states when not to retry, covering the addon_required failure case.

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