Skip to main content
Glama

Recalculate product matching results

refresh_cogs_relation
Destructive

Refresh Cogs Relation

When to use: 상품 매핑 규칙을 고친 뒤 그 결과를 파생 테이블(commerce_union_cogs_relation)에 반영해 화면 수치를 갱신할 때.

When NOT to use: 규칙을 고치지 않았다면 호출할 이유가 없다(비싼 no-op). 광고 쪽 재계산은 refresh_ad_relation 으로 별도다.

Limitations: ⚠️ 되돌릴 수 없다 — 파생 테이블 재계산이라 데이터 관리 이력·복원 지점의 대상이 아니다: 이력에 남지 않으며 복원 지점으로 돌아갈 수도 없다(원본인 옵션↔기초상품 연결(item_relation) 자체는 그것을 고치는 각 도구가 따로 이력에 남긴다). 전체 재계산이라 무겁다 — 규칙을 여러 개 고칠 거면 마지막에 한 번만 호출한다. force=true 는 캐시를 무시하고 강제 재계산한다. data_management:write 권한 필요.

Examples:

  • Q: 상품 매칭 규칙 바꾼 걸 이제 반영해줘 params: {'query': {'force': False}}

Output shape: {"engine": "duckdb" | "trino" | null} — 재계산에 쓰인 엔진. null 은 재계산이 불필요해 건너뛰었다는 뜻.

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": "refresh_cogs_relation"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
project-idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Going well beyond the destructiveHint=true annotation, it discloses that results are irreversible, that the derived table is not covered by data-management history or restore points, that `item_relation` is tracked separately by the editing tools, that the operation is a heavy full recalculation, and that `data_management:write` permission is required.

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?

Headings for when-to-use, when-not-to-use, limitations, and examples make it easy to scan and front-load the key irreversible warning. It is somewhat verbose with emoji and repeated emphasis on the cost of full recalculation, but nearly every sentence carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, irreversible recalculation the critical warnings, permission requirement, and output-shape meaning of `null` are all present. The only gap is the unexplained `project-id` parameter, which matters for a tool that operates per project.

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%, so the description must carry the parameter burden. It fully explains `force` (bypass cache, force recalculation) but never explains what `project-id` means or when to supply it, leaving half the parameters 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?

The description states a specific verb and resource: recalculating product matching rules into the derived table `commerce_union_cogs_relation` so screen figures update. It also distinguishes itself from the sibling `refresh_ad_relation` by noting that ad recalculation is separate.

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 a clear when-to-use trigger (after fixing mapping rules), an explicit when-NOT-to-use (rules unchanged, a costly no-op), and names the alternative for the ad side. It even advises batching multiple rule changes into one final call.

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