Skip to main content
Glama

metric-env

Destructive

Set or remove environment variables that collector scripts read for a database instance or specific metric block, while refusing secret values and mapping them to references.

Instructions

dbabrain common.cli metric-env: The inputs a collector script reads from one instance, set or removed. 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, as written in db_instances.json.

  • env (required): {NAME: value}: written to metrics.collector_env; a value of null removes NAME. A name carrying a secret is refused - metrics.env_secrets maps it to a ref.

  • metric_code: The variables go to that metric's own block (metric_overrides..collector_env), which wins over the target's.

  • 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-env"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, and the description goes beyond them with concrete mechanics: a null value removes NAME, names carrying secrets are refused and mapped to a ref via metrics.env_secrets, and metric_overrides.<CODE>.collector_env wins over the target's block. It does not say whether the change is reversible or what a refusal looks like at runtime, but the destructive path and its guardrails are disclosed.

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

Conciseness3/5

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

The field list is well-structured and front-loaded, but the prose opacities waste space — "Changes or removes something" says nothing the name and annotations do not, and the lead sentence is a dangling fragment. It is compact overall, just unevenly edited.

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?

Given an output schema exists, return values need no explanation, and the description covers fields, side effects, secret handling and the confirm/reason gate. What remains thin is error behavior (missing or unknown server_id, malformed env map) and precedence relative to the sibling metric-* tools.

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

Parameters4/5

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

Schema coverage is 0% on an untyped `request` object, so the description carries the full burden and largely meets it: server_id and env are marked required, env is described as a {NAME: value} map with null-deletes semantics, and metric_code and data_dir are explained. Minor gaps: it only gestures at data_dir ("Another data/ folder to read"), and confirm/reason are described in prose but not listed among the request fields.

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?

States a specific verb and resource: sets or removes the env vars a collector script reads for one instance, written to metrics.collector_env. That is distinguishable from metric-toggle/metric-severity/metric-batch, though the opening phrase ("The inputs a collector script reads from one instance, set or removed") is grammatically awkward and takes a second read.

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?

Adds a real precondition — that this appears on the emergency-operations list, so it requires `confirm: "yes"` plus a `reason` — which tells the agent how to invoke it successfully. It gives no guidance on when to choose this over metric-toggle, metric-batch or metric-severity, and no when-not guidance (e.g. changing the target's own env vs a metric block).

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