Skip to main content
Glama

Replace sales fee history

replace_fee_history
Destructive

Put Fee History Bulk

When to use: 한 (brand_name, channel_name) 키의 판매 수수료(fee) 이력을 통째로 교체해야 할 때 (적용일 행 추가·수정·삭제 모두 이 한 호출). 순매출/마진 계산에 직접 영향을 주는 write 계열 tool. 반드시 먼저 get_fee_history 로 그 키의 현재 행 전체를 읽고, 바꿀 행을 반영한 전체 목록을 fee_histories 로 보낸다. get_fee_history 는 한 번에 최대 2000행이므로 channel_names·brand_names 로 그 키만 좁혀 읽고, 응답이 2000행이면 잘렸을 수 있으니 이 도구로 교체하지 않는다 (offset 페이지는 정렬이 유일하지 않아 행이 빠질 수 있다).

When NOT to use: 단순 조회는 get_fee_history 사용. 현재 행을 읽지 않고 바꿀 행만 보내지 말 것 — 목록에 없는 적용일이 모두 삭제된다. 한 행만 바꿔도 get_fee_history 로 그 키의 현재 행을 읽어 나머지를 그대로 포함한 전체 목록을 보낸다. 키 삭제·프로젝트 수수료 전체 삭제에는 쓰지 말 것(MCP 로 불가). read-only 세션 차단 권장.

Limitations: 이 호출은 그 키의 이력을 통째로 교체한다 — 기존 행을 모두 지우고 fee_histories 의 행만 새로 넣는다. 보낸 목록에 없는 적용일은 삭제된다(변경한 행만 보내면 나머지 적용일이 사라진다). 다른 (brand_name, channel_name) 키·다른 프로젝트의 행은 바뀌지 않는다. fee_histories 는 1개 이상, 같은 적용일(applied_at) 중복 금지. fee_factor 는 비율이 아니라 퍼센트 값이다: 10.5 = 10.5% (0.105 를 보내면 0.105% 로 저장돼 순매출이 틀어진다). 응답은 deleted_count·created_count 만 돌려주므로 결과 행은 get_fee_history 로 다시 읽어 확인한다. 변경은 데이터 관리 수정 이력(entity_type=fee_history)에 호출자 이름으로 남는다. 단, 이력 항목 자체를 되돌리는 기능은 없다 — 되돌리려면 복원 지점이 필요하고, 이 호출은 복원 지점을 만들지 않는다. 큰 변경 전에는 create_restore_point(entity_type=fee_history, entity_id='-') 로 지점을 먼저 만든다 (지점이 없으면 되돌릴 수 없을 수 있다). 복원은 MCP 도구로 열려 있지 않아 웹에서 「변경 기록」으로 하며, 복원은 그 키만이 아니라 프로젝트 수수료 이력 전체를 지점 시점으로 되돌려 다른 키와 지점 이후의 수수료 수정까지 함께 되돌아간다. 키 삭제·프로젝트 수수료 전체 삭제는 MCP 로 할 수 없다. 읽기 전용 MCP 세션에서는 노출 차단 권장.

Examples:

  • Q: '브랜드A' 쿠팡 수수료에 7월부터 11.5% 를 추가해줘 (기존 이력은 유지) params: {'body': {'brand_name': '브랜드A', 'channel_name': 'coupang', 'fee_histories': [{'applied_at': '2026-01-01', 'fee_factor': 10.5}, {'applied_at': '2026-04-01', 'fee_factor': 11.0}, {'applied_at': '2026-07-01', 'fee_factor': 11.5}]}}

Related resources: analytics://glossary/net_sales, analytics://glossary/gross_margin

Output shape: PutFeeHistoryBulkResponse with deleted_count (rows the key had before) and created_count (rows now stored). Does NOT echo the resulting rows — call get_fee_history afterwards if a snapshot is needed.

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": {
      "brand_name": "<brand_name>",
      "channel_name": "<channel_name>",
      "fee_histories": "<fee_histories>"
    },
    "name": "replace_fee_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
brand_nameYes
project-idNo
auth_methodNojwt
channel_nameYes
fee_historiesYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Goes well past the destructiveHint=true annotation: it explains that all existing rows are deleted and replaced, that omitted applied_at dates vanish, that the response only returns deleted_count/created_count, that changes are audit-logged, and that there is no undo except a restore point that rolls back the whole project's fee history. The only gap is the untranslated/odd opener 'Put Fee History Bulk' and no note on concurrency or size limits for large lists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is valuable but the structure is bloated: deletion warnings and 'key/project deletion is not possible via MCP' appear in both the NOT-to-use and Limitations sections, and the restore-point caveat is restated. The opening line 'Put Fee History Bulk' is an unhelpful stub before the real front-loaded statement.

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 bulk-write with a nested array parameter, the description covers the required read-before-write workflow, units, response shape, verification step, rollback limitations, restore-point prerequisite, a worked example, and related glossary resources. An agent has everything needed to call it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description carries the load and does so for the critical parts: fee_histories requires at least one row, applied_at must be unique, and fee_factor is a percent (10.5 = 10.5%, not 0.105). brand_name/channel_name are identified as the composite key. However, project-id and auth_method are never explained, and no applied_at format guidance is given beyond the example.

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 verb and resource — replacing the entire fee history for a (brand_name, channel_name) key — and immediately distinguishes itself from get_fee_history as the read-only sibling. The agent can tell exactly what operation this performs 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?

Has explicit 'When to use' and 'When NOT to use' sections, names the alternative (get_fee_history) and the exact precondition (read all current rows first, then send the full list). It also warns against partial sends, offset paging, and using it for key/project deletion, which is well beyond typical guidance.

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