Skip to main content
Glama

verify

Compares a candidate GPU kernel script against a baseline by running them interleaved, returning mean/std/min metrics and a faster, slower, inconclusive, incorrect, or invalid verdict.

Instructions

Decide whether a candidate script beats the baseline script. Both follow the bench contract (print one JSON line with "ms" and "ok"). Runs them interleaved (baseline, candidate, baseline, candidate, ...) warmup+n times each, back to back on the same card, discards the warmup pairs, and returns mean/std/min for both plus a verdict: 'faster' or 'slower' when |mean_b - mean_c| > 2*sqrt(std_b^2/n + std_c^2/n), 'inconclusive' otherwise, 'incorrect' if the candidate printed ok=false in any run (then no speedup is reported), 'invalid' if the two scripts disagree on shape/dtype/iters/seed or the baseline fails its own check. Also records gpu, driver, power limit, timestamp and the exact commands. Pass the result to record().

Input Schema

NameRequiredDescriptionDefault
nNo
cwdNo
argsNo
warmupNo
timeoutNo
baselineYes
candidateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the full behavioral burden, and it does so well: interleaved execution order, warmup+n repetitions with warmup pairs discarded, same-card execution, and the recorded metadata (gpu, driver, power limit, timestamp, exact commands). What it doesn't state is cost, side effects, or failure behavior (for example, what happens if the timeout is hit or the script crashes); those are left unstated. Those are minor relative to what is covered but keep it below a 5.

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?

It is front-loaded with the core purpose and the verdict rules are essential content, so almost every sentence earns its place. The long run-on clause enumerating verdicts makes it dense to parse, though nothing is genuinely wasted.

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 statistical benchmarking tool with no output schema and no annotations, the description supplies the return shape (mean/std/min plus verdict), the significance threshold, and every verdict state including error cases. Only the ancillary run-control parameters (timeout, cwd, args) remain unaddressed.

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 0% across 7 parameters, so the description must compensate. It gives meaningful semantics for n and warmup through the 'warmup+n times each' narrative, and it clarifies baseline and candidate as bench-contract scripts; however, cwd, args, and timeout are never explained, leaving 3 of 7 parameters undocumented anywhere.

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 decision ('Decide whether a candidate script beats the baseline script') plus the resource (two scripts) and the contract both must follow. This clearly separates it from siblings like bench, profile, or record, which cannot make a comparative verdict.

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?

Implies the use case precisely (compare two benchmark scripts) and gives an explicit downstream step: 'Pass the result to record().' It doesn't name when to prefer bench or profile instead of verify, so no explicit exclusion is stated.

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