Skip to main content
Glama
iris-eval

iris-eval/mcp-server

by iris-eval

Delete Custom Rule

delete_rule
Destructive

Remove an obsolete custom evaluation rule to stop it from affecting future outputs while preserving historical eval results.

Instructions

Remove a deployed custom evaluation rule. The rule stops firing on future evaluate_output calls; past eval_results that referenced it are preserved.

Sibling tools — deploy_rule adds custom rules, list_rules enumerates them, evaluate_output runs them. delete_trace handles trace deletion (separate concern); log_trace / get_traces handle trace I/O. delete_rule is the DESTRUCTIVE remove path for the custom-rule store; it does NOT touch traces, eval_results, or built-in (non-custom) rules.

Behavior. DESTRUCTIVE — rewrites /.iris/custom-rules.json without the deleted row and appends a rule.delete entry to the audit log (/.iris/audit.log). Not idempotent: deleting an already-deleted rule returns deleted: false rather than re-emitting the audit row. The rule stops firing immediately on the live process. Historical eval_results that reference this rule_id stay in the database — drift analytics + audit trail remain valid. Tenant-scoped in Cloud tier; OSS operates on LOCAL_TENANT. Rate-limited to 20 req/min on HTTP MCP.

Output shape. Returns JSON: { "deleted": boolean, "rule_id": string }. deleted=true if a row was removed; deleted=false if no rule with that id existed.

Use when a custom rule is obsolete (behavior changed, false positives unacceptable, replaced by a better rule). Typical flow: list_rules → identify the stale one → delete_rule(id). Combine with deploy_rule to replace: delete_rule(oldId) + deploy_rule(newDefinition). To temporarily disable a rule WITHOUT deletion, use the dashboard's toggle affordance instead — delete is permanent in intent (rule is gone; re-adding requires a new id).

Don't use to pause a rule (toggle in the dashboard preserves history better). Don't use on built-in (non-custom) rules — the rule_id format checks for rule-<hex> custom ids; built-ins aren't in the store. Don't use to delete a trace or eval result (use delete_trace for traces; eval_results deletion is not exposed in v0.4 — they fall under data retention).

Parameters. rule_id is the only parameter; must match rule-<lowercase-hex> format (Zod regex). Format mismatch fails Zod with 400 BEFORE the store is touched. Cross-tenant rule_ids return deleted: false silently — they're invisible to the caller's tenant rather than producing a not-found error (prevents enumeration attacks). The rule_id you pass is exactly what list_rules returned in id or what deploy_rule returned in rule.id.

Error modes. Throws 400 on malformed rule_id (wrong prefix). Returns {deleted: false} if rule_id doesn't match any deployed rule (not an error — idempotent-ish). Returns 429 on HTTP rate limit. File-write failures propagate as 500.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_idYesRule id to delete (format: rule-<hex>); obtained from list_rules or deploy_rule response
Install Server

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true and idempotentHint=false, but the description goes far beyond by detailing exactly what happens: rewrites ~/.iris/custom-rules.json, appends to audit log, returns deleted:false on already-deleted rules, stops firing immediately, preserves historical eval_results, tenant-scoped behavior, and rate limits. No contradiction with annotations; the description adds substantial behavioral context.

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

Conciseness5/5

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

The description is appropriately structured with labeled sections (Behavior, Output shape, Use when, Don't use, Parameters, Error modes), making it scannable. Every sentence provides value, and it is front-loaded with the core action. Despite its length, it is concise for the complexity it covers.

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?

The description covers all relevant aspects: behavior, output shape, usage conditions, parameter details, error modes, and relationship to sibling tools. Given the tool's destructive nature and lack of output schema, this level of detail is complete for an agent to invoke it correctly. No gaps are apparent.

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?

While the schema already covers rule_id with its pattern and description, the description enriches parameter semantics by explaining the Zod format mismatch (400 before store touch) and cross-tenant silent false. It also clarifies that the rule_id is exactly what list_rules or deploy_rule returns. This adds meaning beyond the 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?

The description opens with 'Remove a deployed custom evaluation rule,' a specific verb+resource that clearly states the action. It further distinguishes itself from siblings by explicitly positioning delete_rule as the destructive remove path for the custom-rule store, noting it does NOT touch traces, eval_results, or built-in rules. This fully disambiguates it from delete_trace and other management tools.

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?

The description provides explicit when-to-use guidance ('Use when a custom rule is obsolete...') and a typical flow (list_rules → delete_rule). It also gives clear exclusions: don't use to pause (use dashboard toggle), don't use on built-in rules, and don't use for traces/eval_results. This is exemplary usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iris-eval/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server