Skip to main content
Glama

Apply Google Sheets product matching

apply_sheet_matching
Destructive

Apply Sheet Source

When to use: 미리보기(preview_sheet_matching)로 확인한 시트 매칭을 실제 상품 매칭에 반영할 때. 미리보기의 run_id 를 그대로 넘긴다.

When NOT to use: 미리보기를 사용자에게 보여 주지 않았다면 쓰지 않는다 — 해제(removed) 건수를 먼저 알린다. 몇 건만 고치는 거라면 update_item_relation 으로 해당 옵션만 고친다.

Limitations: ⚠️ 전량 교체다 — 시트에서 지운 행의 매칭은 풀린다(미리보기의 removed). 적용 직전 상태가 복원 지점으로 남아 변경 이력에서 되돌릴 수 있다 — 단 목록의 restorable 이 false 면(소유자가 프로젝트를 여럿 가짐) 되돌릴 수 없으니 먼저 알린다. 이 tool 로는 직접 실행한 미리보기(preview_sheet_matching 의 run_id)만 적용할 수 있다 — 데이터 갱신 뒤 자동으로 만든 미리보기는 409 이니 preview_sheet_matching 으로 다시 만든다. 꺼 둔 소스(enabled=false)는 409. 미리보기 뒤에 다른 적용·되돌리기가 있었거나 run_id 가 최신 미리보기가 아니면 409 — 미리보기를 다시 만든다. 같은 옵션이면 매칭 우선순위가 같을 때 수동 매칭 → 시트 → 다른 솔루션 소스 순서로 이긴다(우선순위를 바꿔 솔루션·규칙이 위면 그쪽이 이긴다). 화면 수치는 이후 데이터 갱신이 끝나야 바뀐다. data_management:write 권한 필요.

Examples:

  • Q: 방금 미리본 시트 매칭 적용해줘 params: {'path': {'data_id': 1}, 'body': {'run_id': '…'}}

Output shape: object: {data_id, last_run{applied}, last_applied{applied_at, applied_by, accepted_options}, union_pending(true 면 대시보드 반영 요청이 아직 안 나갔고 다음 미리보기가 다시 보낸다)}

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": {
      "data_id": "<data_id>",
      "run_id": "<run_id>"
    },
    "name": "apply_sheet_matching"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idYes
data_idYes
project-idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only say destructive=true; the description goes far beyond, disclosing full-replacement semantics, that removed rows become unmatched, restore-point behavior and the restorable=false caveat, 409 conditions, priority resolution order, permission requirement (data_management:write), and delayed dashboard numbers. Slightly short of 5 only because the ordering/priority paragraph is dense and partly ambiguous.

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 structured with When to use / When NOT / Limitations / Example / Output shape headers and the critical constraint (full replacement) flagged up front. The limitations block is long and mixes several distinct 409 causes, but each sentence carries operational information.

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, permission-gated mutation tool this covers prerequisites, failure modes, reversibility, and even the return shape (last_run.applied, union_pending), so an agent has everything needed to call it correctly. Output schema exists, so the extra output note is a bonus rather than a requirement.

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 0%, so the description must compensate: it does explain run_id semantics (must come from the caller's own preview and be the latest, otherwise 409) and shows data_id usage in the example. The `project-id` parameter is never mentioned, leaving one of three params 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?

Names a specific action (applying a previewed sheet matching to real product matches) and immediately ties it to the sibling `preview_sheet_matching` whose run_id it consumes. An agent can distinguish this from preview and from `update_item_relation` 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?

Explicit 'When to use' (after preview confirmed, pass the preview's run_id) and 'When NOT to use' (preview never shown to the user; only a few options to fix → use `update_item_relation`). It also prescribes recovery paths for 409 cases (stale run_id, auto-generated preview, disabled source) via re-running preview.

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