Skip to main content
Glama

Apply uploaded product matching file

upsert_item_relation_from_tmp
Destructive

Upsert Commerce Item Relation From Tmp

When to use: SKU 매칭 엑셀 업로드의 커밋 단계 — 이미 tmp 테이블에 적재된 내용을 원본에 반영할 때.

When NOT to use: 몇 건만 고치는 거라면 절대 쓰지 않는다 — update_item_relation 으로 해당 행만 덮어쓴다. tmp 에 아무것도 올리지 않은 상태로 호출하면 기존 매칭이 통째로 날아갈 수 있다.

Limitations: ⚠️ replace 모드는 스코프 원본을 통째로 갈아엎는다 — DROP TABLE laplacian_{admin}.commerce_item_relation 후 재생성·재적재다. 선행 조건이 있다: tmp 테이블에 업로드 내용이 이미 올라가 있어야 하며, 이 tool 은 업로드 자체를 하지 않는다. 실행 직전 자동으로 복원 지점(checkpointed_change)이 찍히므로 되돌릴 수는 있다. 0행 유효 업로드는 DROP 을 건너뛰고 조기 반환하며 이력에도 남지 않는다. data_management:write 권한 필요.

Examples:

  • Q: 업로드한 상품 매칭 파일을 이제 반영해줘 params: {}

Output shape: object: {added, updated, total}

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "upsert_item_relation_from_tmp"
  }
}

Input Schema

NameRequiredDescriptionDefault
project-idNo
auth_methodNojwt

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds the concrete mechanism: replace mode does DROP TABLE laplacian_{admin}.commerce_item_relation then recreates and reloads, prerequisites that the tmp table must already be populated (this tool does not upload), an automatic checkpointed_change restore point, and early return with no history entry when the upload has 0 valid rows. It also names the required data_management:write permission — exactly the behavioral detail annotations cannot convey.

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?

Well front-loaded with labeled sections (When to use / When NOT / Limitations / Examples / Output shape) and no filler in the guidance itself. Minor waste: the opening line merely restates the tool name, and the mixed Korean/English register makes scanning slightly harder.

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, zero-required-param commit tool with an output schema and annotations in place, the description covers preconditions, destructive scope, recoverability, permission requirement, edge case (0-row upload), and even restates the return shape. Nothing an agent needs to call it safely is missing.

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 description coverage is 0% for the two parameters (project-id, auth_method), so the description would need to carry that load, and it says nothing about either. The example does show 'params: {}', which signals that no arguments are required for the normal commit path, giving partial compensation, but the meaning and effect of project-id remains undocumented.

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 operation: applying contents already staged in the tmp table into the live item-relation table, explicitly framed as the commit stage of a SKU-matching Excel upload. The 'When to use' clause distinguishes it from the single-row sibling update_item_relation, so an agent can pick correctly without opening 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?

Gives an explicit when-to-use (committing an already-uploaded tmp batch), an explicit when-NOT-to-use ('몇 건만 고치는 거라면 절대 쓰지 않는다') naming update_item_relation as the alternative, and a failure condition (calling with an empty tmp table can wipe existing matches). This is the full when/when-not/alternative triad.

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