Skip to main content
Glama

Measure CPU use

measure_performance

Measures real playback performance of a Lathe project by timing audio blocks, reporting mean, 99th-percentile and peak load, deadline misses, dropouts, and per-track CPU costs.

Instructions

Plays part of the project for real and times every audio block, the way a CPU meter does: mean, 99th-percentile and peak load (share of each block's deadline; over 100% is a dropout), blocks that missed the deadline, dropouts the interface reported, each track's own cost per block (heaviest first, with its plug-ins), and the conditions (computer, CPU and cores, interface, buffer size). Bars default to the loop if it's on, else the first four. Takes about seconds plus a short warm-up; Lathe is stopped first and the playhead goes back afterwards.

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

Input Schema

NameRequiredDescriptionDefault
to_barNoBar to stop at
secondsNoHow long to measure, 2 to 20 (default 8). Short bars are played again until it's reached
from_barNoFirst bar to play (1-based)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say it is not read-only, not idempotent and not destructive; the description goes much further by disclosing that audio is actually played, that Lathe is stopped first and the playhead restored afterwards, and that runtime is roughly `seconds` plus a warm-up. These are exactly the side effects an agent needs before invoking a non-read-only tool.

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 result set, then defaults, then timing and side effects — a sensible order. The long enumeration of metrics is dense but each item conveys a distinct return value; the only slight cost is that it reads as one sprawling sentence chain.

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?

There is no output schema, so the description must carry the return shape, and it does comprehensively: aggregate load stats, deadline misses, reported dropouts, per-track costs ordered heaviest-first with plug-ins, and the measurement conditions. Combined with the side-effect and timing notes, an agent has everything needed to call it and interpret the result.

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 100%, so baseline is 3, but the description adds real meaning: bars default to the loop when active and otherwise to the first four, and short bars are replayed until `seconds` is reached (warm-up on top of that). The only gap is that it doesn't restate the 1-based/2–20 bounds, which the schema already covers.

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?

The description opens with a concrete verb and mechanism — 'Plays part of the project for real and times every audio block, the way a CPU meter does' — and then enumerates exactly what is reported (mean, 99th-percentile, peak load, missed blocks, reported dropouts, per-track cost, conditions). This separates it clearly from analysis-style siblings like analyze_mix or compare_processing_cores, which don't perform real playback timing.

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?

Usage is implied by the stated purpose (you run it to get a CPU load measurement) and by operational hints such as 'Takes about `seconds` plus a short warm-up' and the bar defaults. However, it never says when to choose this over compare_processing_cores or analyze_mix, nor any exclusions or prerequisites. That is adequate but leaves the agent to infer routing.

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