Skip to main content
Glama

Update ad matching rule

update_ad_rule_mapping
Destructive

Update Ad Rule Mapping

When to use: 광고 매칭 규칙 하나(seq)의 이름·조건·대상상품·우선순위를 수정할 때.

When NOT to use: 규칙을 여러 개 고쳐야 해도 이 tool 을 규칙마다 한 번씩 부르는 편이 안전하다 — 웹의 규칙 일괄 저장은 일괄 수정이 아니라 규칙 집합 전체를 재정의하는 경로라 고칠 규칙만 담아 보내면 나머지가 삭제된다. 순서만 바꾸는 전용 도구는 없다 — 이 도구의 priority 로 규칙마다 옮긴다. 규칙 삭제는 delete_ad_mapping_rule.

Limitations: path.seq 로 대상 규칙을 지정한다. body 필드는 모두 선택이며 넘긴 필드만 갱신되고 내용이 재적용된다 — 규칙 하나를 안전하게 고치는 정식 경로다(다른 규칙은 건드리지 않는다). 조건을 바꿀 때는 mapping_rule(AST)과 mapping_rule_fe(화면 표현)를 반드시 함께 넘긴다. 넘기지 않은 필드는 이전 값이 그대로 남으므로, AST 만 갱신하면 화면은 이전 조건을 계속 보여준다 — 실제 매칭은 이미 새 조건으로 바뀐 뒤라 조용히 어긋난다(규칙 조회·다운로드·match-count 가 모두 mapping_rule_fe 를 먼저 읽고 없을 때만 AST 로 폴백한다). 반대로 mapping_rule_fe 만 빈 값으로 넘기면 화면에는 '조건 없음'으로 보이는데 AST 는 살아 있어 계속 매칭된다. priority 를 넘기면 이 규칙의 값만 바뀐다 — 다른 규칙을 밀어내거나 다시 매기지 않으므로 같은 priority 를 가진 규칙이 생길 수 있다. 순서를 옮길 때는 겹치지 않는 값을 고르거나, 밀려야 할 규칙도 이 도구로 하나씩 고친다. data_management:write 권한 필요.

Examples:

  • Q: 이 광고 규칙 이름을 '여름세일_2026'으로 바꿔줘 params: {'path': {'seq': 12}, 'body': {'mapping_name': '여름세일_2026'}}

Output shape: no content (성공 시 body 없음)

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": {
      "seq__path": "<seq__path>"
    },
    "name": "update_ad_rule_mapping"
  }
}

Input Schema

NameRequiredDescriptionDefault
seqNo
priorityNo
seq__pathYes(Path parameter)
project-idNo
auth_methodNojwt
mapping_nameNo
mapping_ruleNo
mapping_rule_feNo
mapping_productsNo
distribution_policy_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, yet the description adds substantial context beyond them: only passed fields are updated, untouched fields retain prior values, mapping_rule (AST) and mapping_rule_fe (screen representation) must be sent together or matching silently diverges from what the UI shows, priority changes affect only this rule and can produce duplicates, and `data_management:write` permission is required. This is exactly the kind of silence-failure disclosure 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 headers for when-to-use, when-not-to-use, limitations, and an example; the AST/FE warning is placed where an agent will hit it. It runs long and restates the 'only passed fields are updated' point twice, but nearly every sentence carries operational risk information rather than 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 destructive 10-parameter mutation with no output schema, the definition covers target selection, partial-update semantics, the concurrent-field hazard, permission requirements, the alternative destructive path, and states the output shape (no content on success). The remaining gaps around distribution_policy_id and product-list replace semantics are minor relative to what is disclosed.

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?

Schema description coverage is only 10%, so the description carries most of the burden; it explains seq as the path selector, mapping_name, the critical AST/FE pairing of mapping_rule and mapping_rule_fe, and priority semantics including duplicate creation. It leaves project-id, auth_method, and distribution_policy_id unexplained, and does not clarify whether mapping_products replaces or merges the existing list.

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 scoped precisely: modifying one ad matching rule identified by seq, covering name, conditions, target products, and priority. It explicitly separates itself from the bulk web-save path, from `delete_ad_mapping_rule`, and notes there is no dedicated reorder tool, so an agent can route correctly without inspecting siblings.

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?

Provides an explicit 'When to use' and 'When NOT to use' section, including the non-obvious warning that reordering requires multiple calls to this same tool because no reorder tool exists, and that deletion goes to `delete_ad_mapping_rule`. It also warns against the bulk-save path, which deletes rules not included in the payload.

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