Skip to main content
Glama

delete_rule

DestructiveIdempotent

Delete a product rule (Attribute Rule) and unlink it from every feed attribute that uses it. Use this when the user explicitly asks to delete a rule. DESTRUCTIVE: a rule may shape a live feed — check its usageCount with list_rules / get_rule first, warn the user, then call with confirm:true. Without confirm:true the call returns error 'confirm_required' and nothing is deleted. Identify the rule by rule_id (from list_rules). scope selects the library: 'project' (default) or 'shared_template' (a template_read_only error means your access cannot write there). Returns {ruleId, scope, status:'deleted', changed, reason, validation}. Any feed that used this rule reverts to its other value source; run export_feed on those feeds to refresh their output. project_id is OPTIONAL (inferred for a single-project customer; project_id_required otherwise — then call list_projects).

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": {
      "rule_id": "<rule_id>"
    },
    "name": "delete_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNoWhich library the rule lives in: 'project' (default) = the project's own library; 'shared_template' = the reusable shared template library.
confirmNoMust be true to actually delete; without it the call returns 'confirm_required' and nothing is deleted.
rule_idYes
project_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already flag destructiveHint=true, but the description goes well beyond them: what gets destroyed (rule unlinked from every feed attribute), what happens downstream (affected feeds revert to their other value source and need export_feed), the guard-rail behavior (no confirm means nothing is deleted), and the permission failure mode (template_read_only). This is exactly the extra context an agent needs before a destructive call.

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?

Front-loaded with purpose, then destructive warning, then mechanics — good ordering with no filler sentences. It is a single dense paragraph, though, so the bulk of operational rules (confirm gate, scope errors, project_id inference) would scan faster as short bulleted lines.

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, 4-parameter tool with no output schema, the description supplies everything: return shape ({ruleId, scope, status, changed, reason, validation}), the post-delete remediation step, and identity/permission caveats. Nothing an agent needs in order to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is only 50%, so the description must carry the load and does: rule_id is sourced from list_rules, scope default 'project' plus the shared-library access error, confirm's failure semantics, and project_id's optional/inferred/ project_id_required behavior with the list_projects fallback. Every one of the four parameters gains meaning beyond the raw schema.

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 ('Delete a product rule (Attribute Rule)') plus the side effect of unlinking it from every feed attribute. That side-effect clause alone separates it from siblings like delete_feed, delete_ad, or update_rule without opening any 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 trigger ('when the user explicitly asks to delete a rule'), a mandatory precondition workflow (check usageCount with list_rules / get_rule first, warn the user, then confirm), and an alternative route via update_rule. It also names the escape hatches: 'confirm_required' and 'template_read_only'.

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