Skip to main content
Glama

Sunaiva Gate — Agent Rule Enforcement

add_custom_rule

Create a custom detection rule in the backend. Requires API key (Pro+).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRule name
tierNoOptional tier restriction
severityYesSeverity on match
descriptionYesRule description (required — the backend 400s on a missing/empty description)
detection_patternYesCompiled regex detection pattern (required — the backend 400s on a missing/empty detection_pattern). There is no 'pattern' field: 'detection_pattern' is the only field name the evaluator reads; the backend explicitly rejects 'pattern'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / description / description
      Previous value: -"Optional description"New value: +"Rule description (required — the backend 400s on a missing/empty description)"
    • changedInput schema / properties / detection_pattern / description
      Previous value: -"Compiled regex detection pattern"New value: +"Compiled regex detection pattern (required — the backend 400s on a missing/empty detection_pattern). There is no 'pattern' field: 'detection_pattern' is the only field name the evaluator reads; the backend explicitly rejects 'pattern'."
    • removedInput schema / properties / pattern
      Removed value: -{
      -  "description": "Detection pattern (regex or keyword)",
      -  "type": "string"
      -}
    • changedInput schema / properties / severity / enum
      Previous value: -[
      -  "block",
      -  "warn",
      -  "log"
      -]New value: +[
      +  "block",
      +  "warn"
      +]
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "severity"
      -]New value: +[
      +  "name",
      +  "description",
      +  "detection_pattern",
      +  "severity"
      +]
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral transparency burden. It discloses that this is a create operation (implying a write/mutation) and that an API key is required. However, it omits other behavioral traits such as side effects, return value, or error handling, leaving the agent to infer those from the schema or elsewhere.

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?

Two concise sentences clearly convey the purpose and a key prerequisite. No filler or redundant information, front-loaded with the action.

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

Completeness3/5

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

The description covers the core purpose and auth requirement, and the schema fully documents parameters. However, with no output schema and no annotations, the description does not explain return values or any potential side effects/error conditions, leaving some context gaps for a mutation tool.

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?

The schema provides 100% coverage for all 5 parameters, each with descriptions. The tool description adds no parameter-level meaning beyond what the schema already documents, so the baseline of 3 is appropriate.

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 starts with a specific verb ('Create') and a clear resource ('custom detection rule'), with the scope ('in the backend') adding context. This clearly distinguishes it from sibling tools like update_custom_rule, delete_custom_rule, and list_custom_rules.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool (to create a detection rule) and a key prerequisite ('Requires API key (Pro+)'). It does not explicitly mention alternatives or when-not-to-use, but the purpose verb makes the applicability obvious, and the auth note is a useful guideline.

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