Skip to main content
Glama

run_media_qa

Read-onlyIdempotent

Validate a rendered MP4 with fail-closed Media QA: ffprobe format, video/audio checks, loudness, true peak, dead air, and black/frozen frames; returns ok plus details, hard failures set ok to false.

Instructions

Run the fail-closed Media QA Gate on a rendered MP4: ffprobe format, video and audio checks, loudness (LUFS) and true peak, dead air, black and frozen frames. Read-only. Returns {ok, hard_fails, checks, sha256, width, height, duration_sec, audio, video}; ok is false when any hard check fails. A missing ffprobe or ffmpeg makes the call return an error (isError), not ok:false. Run it after render_deck finishes (poll render_status until finished).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mp4": "<mp4>"
    },
    "name": "run_media_qa"
  }
}

Input Schema

NameRequiredDescriptionDefault
mp4YesPath to the rendered MP4 file (e.g. out/dup-protocol-cosmos.mp4)
expect_loudnormNoEnforce broadcast loudness (-16 LUFS +/- 2.5) and True Peak ceiling when true

Output Schema

NameRequiredDescriptionDefault
okYes
audioNo
videoNo
widthYes
checksYes
heightYes
sha256Yes
hard_failsYes
duration_secYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.5
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "audio": {
      +      "type": "object"
      +    },
      +    "checks": {
      +      "type": "array"
      +    },
      +    "duration_sec": {
      +      "type": "number"
      +    },
      +    "hard_fails": {
      +      "type": "integer"
      +    },
      +    "height": {
      +      "type": "integer"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "sha256": {
      +      "type": "string"
      +    },
      +    "video": {
      +      "type": "object"
      +    },
      +    "width": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "hard_fails",
      +    "checks",
      +    "sha256",
      +    "width",
      +    "height",
      +    "duration_sec"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.1.4
    • changedInput schema / properties / mp4 / description
      Previous value: -"Path to MP4 file (e.g. out/radar-pro.mp4)"New value: +"Path to the rendered MP4 file (e.g. out/dup-protocol-cosmos.mp4)"
  3. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / expect_loudnorm / description
      Added value: +"Enforce broadcast loudness (-16 LUFS +/- 2.5) and True Peak ceiling when true"
  4. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so safety is covered. The description still adds genuinely non-obvious behavior: fail-closed gating, that ok is false when a hard check fails, and that a missing ffprobe/ffmpeg yields isError rather than ok:false — a distinction an agent cannot infer from annotations or schema. The enumerated return field list is partly redundant with the output schema.

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?

Front-loaded with the action and check list, then the result contract, then the failure mode and prerequisite — a sensible priority order with no filler sentences. It is dense and semicolon-heavy, and the inline return-field enumeration could be trimmed since an output schema exists.

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

Completeness5/5

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

For a 2-parameter tool with full schema coverage, annotations, and an output schema, the description supplies exactly the missing pieces: fail-closed semantics, the ok:false versus isError distinction, and render sequencing. An agent has everything needed to invoke it correctly and interpret the two failure modes.

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 both parameters are already documented, including expect_loudnorm's default of true and its LUFS/true-peak intent. The description mentions loudness and true peak checks but does not explicitly link them to the expect_loudnorm flag or explain what happens when it is false, so it adds only marginal meaning over the schema.

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?

Names a specific verb and resource ('Run the fail-closed Media QA Gate on a rendered MP4') and then enumerates the concrete checks performed (ffprobe format, video/audio, LUFS and true peak, dead air, black and frozen frames). This is clearly distinguishable from siblings like audit_deck_claims or deck_doctor without opening any schema.

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?

Explicitly states the sequencing prerequisite: run after render_deck finishes and poll render_status until finished, which names two siblings and the condition that selects them. It stops short of stating when NOT to run (e.g. on non-MP4 artifacts or before a render exists), so it is clear context rather than full when/when-not coverage.

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