Skip to main content
Glama

generate_waveform

Render a PNG waveform image from an audio or video file, returning the output path and optional base64 data. Use it to visualize audio amplitude with custom size, color, and scale.

Instructions

Generate a PNG waveform image from an audio or video file. Returns the file path and inlined base64 image data.

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": {
      "inputPath": "<inputPath>",
      "outputPath": "<outputPath>"
    },
    "name": "generate_waveform"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoWaveform color in hex or name (such as '0x6366f1', 'white', or 'black'). Default: '0x6366f1'.0x6366f1
scaleNoAmplitude scale: 'lin', 'log', or 'sqrt'. Default: 'lin'.lin
widthNoImage width in pixels. Default: 1200.
heightNoImage height in pixels. Default: 280.
inputPathYesPath to the audio or video file.
outputPathYesDestination path for the PNG image.
includeBase64NoReturn base64 image data in the response for vision models. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • addedInput schema / properties / color / pattern
      Added value: +"^(0x[0-9a-fA-F]{6}|#[0-9a-fA-F]{6}|[a-zA-Z]{3,20})$"
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / includeBase64 / default
      Added value: +true
  3. Changed7 schema fields changedv0.4.2
    • changedInput schema / properties / color / description
      Previous value: -"Waveform color in hex format (e.g. 0x6366f1, 0x10b981, white, red)"New value: +"Waveform color in hex or name (such as '0x6366f1', 'white', or 'black'). Default: '0x6366f1'."
    • changedInput schema / properties / height / description
      Previous value: -"Waveform image height in pixels"New value: +"Image height in pixels. Default: 280."
    • changedInput schema / properties / includeBase64 / description
      Previous value: -"Whether to include base64 image data in response for AI vision (default: true)"New value: +"Return base64 image data in the response for vision models. Default: true."
    • changedInput schema / properties / inputPath / description
      Previous value: -"Path to audio or video file"New value: +"Path to the audio or video file."
    • changedInput schema / properties / outputPath / description
      Previous value: -"Target output image path (typically .png)"New value: +"Destination path for the PNG image."
    • changedInput schema / properties / scale / description
      Previous value: -"Waveform amplitude scale"New value: +"Amplitude scale: 'lin', 'log', or 'sqrt'. Default: 'lin'."
    • changedInput schema / properties / width / description
      Previous value: -"Waveform image width in pixels"New value: +"Image width in pixels. Default: 1200."
  4. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / includeBase64
      Added value: +{
      +  "description": "Whether to include base64 image data in response for AI vision (default: true)",
      +  "type": "boolean"
      +}
  5. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the response shape ('file path and inlined base64 image data') — valuable since no output schema exists. However, it omits the file-writing side effect implied by outputPath, whether existing files are overwritten, and what happens on invalid or missing input paths.

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

Conciseness5/5

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

Two sentences, front-loaded with the purpose and followed immediately by the return contract. Zero filler and nothing redundant against the structured fields.

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?

Given seven parameters, no annotations, and no output schema, the description covers only the purpose and the return payload. It leaves gaps around the write-to-outputPath side effect, overwrite behavior, and failure modes that an agent needs before calling a file-producing tool.

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%, with all seven parameters documented including enums, defaults, and the color pattern, so the schema does the heavy lifting. The description adds no meaning beyond it — notably it does not explain the interaction between includeBase64 and the returned payload.

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 description uses a specific verb ('Generate') and a precise resource ('PNG waveform image') scoped to audio or video inputs. This is inherently distinguishable from every sibling (media_probe, extract_thumbnail, extract_audio, etc.), though it never explicitly contrasts itself with any of them.

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 when-to-use guidance, no prerequisites, and no mention of alternatives. Nothing tells the agent whether to prefer this over extract_thumbnail (also image-producing) or media_probe (also audio-analysis), or what input formats are accepted beyond the vague 'audio or video file'.

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