Skip to main content
Glama

MyProduct: Apply AI Mapping Result

apply_ai_mapping
Destructive

[Store Products] [What it does] Applies one already-completed and user-confirmed AI Mapping task result to a product's live supplier variant mapping used for future fulfillment. [When to use] Use after an AI Mapping task has succeeded and the user has reviewed and confirmed the final product/supplier preview, to commit that result. [When not to use] To search AI Mapping candidates or create the mapping task, use the corresponding candidate-search or create tools. Never call this on an unconfirmed or still-running task. [How to use] task_id is required and must belong to the current account with status ProgressSuccess. The tool rechecks task ownership and status immediately before writing; if already applied, it returns without re-writing. The write is sent once — if the outcome is unknown, re-check with get_job_status/get_store_product_mapping rather than retrying. [Side effects] Changes the product's live supplier mapping used for future order fulfillment. [Confirmation] Required, never skippable: show the exact product/supplier/task preview and get an explicit second confirmation before calling.

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

Input Schema

NameRequiredDescriptionDefault
task_idYesExact completed AI Mapping task ID shown in the final apply preview and approved by the user's latest explicit second confirmation. It must belong to the authenticated account and currently have ProgressSuccess.

Output Schema

NameRequiredDescriptionDefault
appliedYesWhether this call applied the AI Mapping result
messageYesHuman-readable operation result
task_idYesExact Product BFF AI Mapping task ID
operationYesCompleted business operation
final_statusYesFinal known AI Mapping application status
already_appliedYesWhether the AI Mapping task was already applied before this call
previous_statusYesAI Mapping application status checked immediately before the write
previous_progressYesAI Mapping task progress checked immediately before the write
toolcall_response_atYesUTC timestamp when the Tool response was returned, formatted as RFC3339.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations, it discloses the ownership and ProgressSuccess recheck, the already-applied no-op behavior, the single-write retry warning, and the exact side effect on future fulfillment. It also states that confirmation is never skippable, which is important behavioral context for a destructive mutation.

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 definition is front-loaded and organized into clear sections for purpose, usage, mechanics, side effects, and confirmation. Every section adds relevant operational guidance for a destructive mutation, with no 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 one-parameter but destructive commit tool, the description covers prerequisites, confirmation requirements, side effects, idempotency-like already-applied behavior, and retry handling. Since an output schema exists, it does not need to explain return values.

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% and the schema already describes task_id as the exact completed task ID belonging to the account with ProgressSuccess status. The description reinforces the required confirmation context and recheck behavior, but does not add syntax or format meaning beyond what the schema provides.

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 states a specific verb and resource: it applies a completed, user-confirmed AI Mapping task result to a product's live supplier variant mapping. It clearly distinguishes this commit action from searching candidates or creating the mapping task, so an agent can identify the tool without opening the 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?

It gives explicit when-to-use guidance: after a successful AI Mapping task and after user review/confirmation. It also gives explicit when-not-to-use guidance, naming the alternative candidate-search or create tools and forbidding use on unconfirmed or still-running tasks.

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.