Skip to main content
Glama

metric-toggle

Destructive

Turn metrics, collector types, or all monitoring on or off for a specific database instance, and require a reason when disabling one metric.

Instructions

dbabrain common.cli metric-toggle: A metric, a collector type or all of them switched on or off for one instance. Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • server_id (required): The instance.

  • scope (required): all | a collector type | a METRIC_CODE.

  • state (required): on | off.

  • reason: With state off and a METRIC_CODE scope: why the metric is off, written as metric_overrides..disabled_reason. Refused with state on or another scope; switching the metric on clears it.

  • data_dir: Another data/ folder to read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "metric-toggle"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and openWorldHint=true, and the description is consistent with them, adding that the tool 'changes or removes something' and that the reason string is persisted as metric_overrides.<CODE>.disabled_reason and cleared on re-enable. That persistence-and-clearing behavior goes meaningfully beyond the annotations, though the confirm requirement is stated ambiguously rather than as a firm precondition.

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?

The purpose is front-loaded before the request-field list, and each bullet earns its place by documenting a field the schema leaves untyped. Minor waste remains in the CLI-namespace prefix and the vague filler sentence 'Changes or removes something.'

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

Completeness4/5

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

For a destructive, open-world mutation with a bare one-parameter schema and an existing output schema, the description supplies the missing field contract, the confirmation/reason protocol, and the disable-reason side effect. What it leaves unresolved is whether `confirm` is mandatory for this specific tool and what values a 'collector type' scope accepts.

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 description coverage is 0% and the schema exposes only an untyped `request` object with additionalProperties=true, so the description carries the entire burden — and it does, enumerating server_id, scope (with its all | collector type | METRIC_CODE domain), state (on | off), reason, and data_dir with required markers and cross-field constraints. The only thin spot is data_dir ('Another data/ folder to read'), which is minor.

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 gives a specific verb (switch on/off) and resource (a metric, a collector type, or all of them) scoped to one instance, which is far clearer than the bare name metric-toggle. It does not, however, distinguish itself from nearby siblings such as metric-batch, metric-env, or metric-severity, so the agent gets no explicit routing signal.

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

Usage Guidelines3/5

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

It gives conditional usage rules for the `reason` field (only valid with state off plus a METRIC_CODE scope; refused otherwise, and cleared when the metric is re-enabled) and notes that emergency-operations commands need `confirm: "yes"` and a `reason`. That is genuine when-to-use guidance, but it is hedged — the agent cannot tell whether metric-toggle itself is on that emergency-operations list — and no alternative tools are named.

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

Deploy Server

Other Tools