Skip to main content
Glama
sovereign-verify-mcp

sovereign-verify-mcp

by pjrpjr

compile_datadog_to_metricsql

Read-onlyIdempotent

Compile Datadog metric or monitor queries into VictoriaMetrics MetricsQL, flagging proprietary ML and log functions with explicit red-flag markers to prevent silent drops.

Instructions

AST-compile Datadog metric or monitor queries into VictoriaMetrics MetricsQL with zero silent drops: proprietary ML/log functions (anomalies, forecast, outliers, logs, events) are explicitly flagged with [RED FLAG] quarantine markers. Supports single query or bulk monitors.

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": "compile_datadog_to_metricsql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoSingle Datadog metric or monitor query (e.g. 'avg(last_5m):avg:system.cpu.user{env:prod,!host:canary*} by {service} > 85').
monitorsNoOptional bulk list of Datadog monitor JSON objects ({id, name, type, query}) to compile into vmalert YAML.
default_windowNoDefault range window for .as_rate() and .as_count() modifiers.1m
sanitize_metric_namesNoConvert dots in metric names to underscores.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: unsupported ML/log functions are quarantined with [RED FLAG] markers rather than silently dropped, and bulk input is emitted as vmalert YAML. It stops short of describing exact marker placement or output structure, but that is a modest gap.

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, both front-loaded with the core conversion statement first and the quarantine behavior second. Dense but every clause carries information; only the jargon load ('AST-compile', MetricsQL) slightly slows comprehension.

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 read-only, idempotent pure-transformation tool with four fully documented optional parameters and no output schema, the description covers purpose, both input modes, and the important quarantine behavior. Missing only minor detail such as how [RED FLAG] entries appear in the compiled output.

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 the schema already documents query, monitors, default_window and sanitize_metric_names. The description only restates the query-vs-monitors split and adds no syntax, format, or edge-case detail beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource pair ('AST-compile Datadog metric or monitor queries into VictoriaMetrics MetricsQL') plus the conversion target. Siblings are unrelated audit/compliance tools, so no differentiation is required, and an agent can immediately tell what this tool produces.

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?

The final sentence ('Supports single query or bulk monitors') signals the two modes and implicitly maps them to the query vs monitors parameters. However, there is no explicit when-to-use framing, no prerequisite notes, and no stated conditions for choosing one mode over the other beyond the parameter names.

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