Skip to main content
Glama

Set detector configuration

stack_upsert_detector_config
Destructive

Set the account's customization for one detector: custom regex patterns (custom_patterns), suppression of false-positive matched_text values (whitelist_patterns), severity remaps for built-in patterns (severity_overrides) and a master switch (enabled). Detector settings are a controls feature: with controls on a change applies at once, with no approval; without controls the API answers 402 CONTROLS_REQUIRED. A self-managed install has every controls feature.

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": {
      "detector_key": "<detector_key>"
    },
    "name": "stack_upsert_detector_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
enabledNoMaster switch — set false to disable this detector entirely for your operator
detector_keyYesDetector key, e.g. "prompt_injection"
custom_patternsNoUp to 50 operator-specific patterns
severity_overridesNoMap of built-in pattern_id → desired severity
whitelist_patternsNoUp to 50 suppression rules

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description adds substantive behavior: uncontrolled deployments return 402, controlled ones apply the change instantly with no approval step, and self-managed installs always have controls. The main omission is whether fields left out are cleared or preserved — a critical detail for a destructive upsert.

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?

Two sentences, front-loaded with the resource and fields, then the controls behavior. The parenthetical parameter names are slightly dense but each carries information; there is no filler or repetition.

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?

For a five-parameter, nested-object mutation tool with no output schema, the definition covers the fields and the controls gate but leaves a meaningful hole: it never says whether the payload replaces the whole detector config (implied by destructiveHint) or merges with existing settings. The 402 failure mode is disclosed, but the success response and replace semantics are not.

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?

Schema description coverage is 100%, so all five parameters are already documented at the field level, and the description mainly restates them with a short gloss each ('suppression of false-positive matched_text values', 'severity remaps for built-in patterns'). The glosses add modest clarity about intent, but no format, limits, or interaction rules beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Set') with a precise resource ('the account's customization for one detector') and enumerates the four configurable areas with their parameter names, so the agent knows exactly what will be changed. It does not explicitly contrast itself with stack_get_detector_config or stack_reset_detector_config, though the naming and scope make the distinction reasonably inferable.

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?

It gives real preconditions: changes apply immediately without approval when controls are on, and the call fails with 402 CONTROLS_REQUIRED when controls are off, with the note that self-managed installs have all controls features. It stops short of telling the agent to read the existing config first or to use stack_reset_detector_config to undo, so alternatives are only implied.

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.