Skip to main content
Glama

metric-batch

Destructive

Executes a batch of metric items sequentially against one database target, resolving credentials from inventory and encrypted secrets so no password is sent.

Instructions

dbabrain common.cli metric-batch: One target's metric items, run one after another - the metrics app's execution. server_id (or target) names the server; its connection or host login is completed from this node's inventory and encrypted secret store, so a request carries no password. 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):

  • target (required): The target's connection facts, resolved: target_id, db_type, host, port, database ("" = the engine's default, master on SQL Server), service_name, sqlserver_driver, sqlserver_tls_verify, username and password; or the ...

  • secrets: {ref: value} for exactly the secret refs this target's configuration names (a remote login's password_ref, the bridge's secret_ref) - never the whole store.

  • items (required): One per metric, run in order: {id, kind: sql, sql, timeout_seconds, max_rows, per_database, max_databases} | {id, kind: script, script, shell, access, credential, env, timeout_seconds} | {id, kind: local, path, env, t...

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-batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/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 corroborates this with 'Changes or removes something'. It adds genuinely useful context beyond annotations: credentials are resolved from node inventory and the encrypted store so no password travels in the request, and confirm/reason is required for emergency operations. However it never says what happens if one item in the batch fails (partial execution, abort, rollback) — a critical gap for a destructive sequential batch.

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

Conciseness2/5

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

The text is pasted CLI documentation, with backticked command paths, redundant framing ('as on the command line'), and multiple mid-sentence truncations. The critical target/items structure is buried after incidental prose rather than front-loaded.

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?

An output schema exists so return values need no explanation, and the credential-resolution background is helpful for a complex nested request. But truncation leaves the item schema incomplete and failure semantics for a destructive multi-step batch undefined.

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% (a single opaque 'request' object), so the description must carry the load and largely does: it names target and items as required, explains target's connection facts, restricts secrets to exactly the named refs, and enumerates the three item kinds with their fields. The value added is substantial, but the text is truncated mid-field-list ('or the ...', '{id, kind: local, path, env, t...'), and it declares required fields that the schema leaves optional.

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 opening states a specific action and resource: one target's metric items run in sequence, described as 'the metrics app's execution'. That distinguishes it adequately from config-oriented siblings like metric-toggle or metric-severity, though the phrasing is awkward and embedded in CLI help boilerplate.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over the metric-* siblings, nor on prerequisites beyond the credential resolution note. The only conditional mentioned is the emergency-operations confirm:'yes' + reason rule, which is a request requirement rather than usage routing.

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