Tools for agents: Lossless PCM WAV clip concatenation

Join PCM audio clips into one real WAV and receive exact segment frame ranges and sample checksums.

Connect with MCP

{
  "mcpServers": {
    "super-agent-tools": {
      "url": "https://app.getsupers.com/sites/agent-wav-concat/mcp"
    }
  }
}
Streamable HTTP · No API key · Stateless

Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.

Call concatenate_wav_clips

Provide one or more plain base64 mono/stereo integer PCM WAV clips, 8/16/24/32-bit. All clips must have exactly the same sample rate, channel count and sample width; resample or convert separately if needed. Every clip must contain at least one frame. Combined decoded inputs and output must fit 524288 bytes; combined encoded text is also bounded by the base64 size of that budget, including each clip's padding. Total joined duration must fit 15 seconds. Output follows list order and preserves every PCM sample byte with no silence inserted, mixing, fades, normalization, resampling or automatic boundary smoothing. Abrupt boundaries can click. Segment ranges are zero-based half-open [start_frame,end_frame), contiguous and expressed in complete multichannel frames. Each segment hash covers its input PCM; output hashes cover raw joined PCM and the full WAV respectively. Container metadata is discarded. Decode audio_base64 to save the actual output. No paths or URLs are accepted; no audio is persisted.

Input and output schemas
{
  "name": "concatenate_wav_clips",
  "title": "Lossless PCM WAV clip concatenation",
  "description": "Join same-format PCM WAV clips in input order, without resampling or changing sample bytes; return segment frame ranges and an actual WAV.",
  "inputSchema": {
    "properties": {
      "clips_base64": {
        "items": {
          "type": "string"
        },
        "title": "Clips Base64",
        "type": "array"
      }
    },
    "required": [
      "clips_base64"
    ],
    "title": "concatenate_wav_clipsArguments",
    "type": "object"
  },
  "outputSchema": {
    "additionalProperties": true,
    "title": "concatenate_wav_clipsDictOutput",
    "type": "object"
  },
  "icons": null,
  "annotations": {
    "title": null,
    "readOnlyHint": true,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "meta": null,
  "execution": null
}

Run the example to see the actual result.

HTTP alternative

POST https://app.getsupers.com/sites/agent-wav-concat/call
Content-Type: application/json

{
  "clips_base64": [
    "UklGRkQAAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAAZGF0YSAAAAAAEAAgAPAA4AAQACAA8ADgABAAIADwAOAAEAAgAPAA4A==",
    "UklGRkQAAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAAZGF0YSAAAAAAEAAgAPAA4AAQACAA8ADgABAAIADwAOAAEAAgAPAA4A=="
  ]
}

The HTTP and MCP interfaces execute the same implementation. Validation errors are returned explicitly. See the tool notes above for its supported inputs and behavior.

Concatenation preserves sample bytes and frame boundaries

Read the explanation

The saved example supplies the same eight-frame stereo clip twice. Each has sixteen-bit samples at eight thousand Hertz. Appending their raw frames yields sixteen stereo frames. Segment one spans zero through eight; segment two spans eight through sixteen, excluding each end. The boundary is contiguous with no inserted silence or overlap. This is a worked example from locally decoded inputs, not a remotely generated WAV. One clip has thirty-two raw PCM bytes; the joined output has sixty-four. Sixteen frames at eight thousand Hertz last two milliseconds. Sample rate, channel count and width must match exactly across all inputs. The join performs no resampling, mixing, normalization, fade or automatic smoothing. Here the final negative sample meets the next positive sample abruptly; a boundary jump can click. The contract bounds combined decoded inputs and output, encoded text including each padding contribution, and total duration. Raw segment hashes identify each input PCM sequence; joined PCM and the rebuilt WAV have separate hashes. Container metadata is discarded. No paths, URLs or persisted audio are accepted. Returned base64 must be decoded to save the artifact. The local page form is preserved, but no HTTP or MCP execution is verified here.

Lossless PCM WAV Clip Concatenation Mechanics

How does the tool concatenate PCM audio clips losslessly and track segment frame ranges without audio degradation?

The tool parses standard base64-encoded PCM WAV clips, validates that all segments share identical sample rates, bit widths, and channel counts, and strips container headers to extract the raw interleaved audio frames. It then joins the raw PCM sample byte streams sequentially in input order without resampling, re-encoding, dithering, or volume alteration, rebuilding a single valid RIFF/WAV container. Provenance is reported via half-open, zero-based frame intervals [start_frame, end_frame) alongside SHA-256 hashes for individual and concatenated sample buffers.

All input clips must strictly share identical channel counts (1 or 2), sample bit depths (8, 16, 24, or 32-bit), and sample rates; mixed formats fail validation rather than automatically resampling. Boundaries are concatenated directly without equal-power crossfades or zero-crossing alignment, meaning non-zero boundary sample values can cause audible clicks or pops. Combined payload size is capped at 524,288 bytes and 15 seconds of cumulative duration.

Try a worked example

Executing 'Run tool' with the default input containing two identical 8-frame stereo PCM clips (8000 Hz, 16-bit) yields a joined audio stream of 16 total frames (0.002 seconds duration). In the structured JSON response, 'clip_count' becomes 2, with the first segment spanning frames 0 to 8 and the second segment spanning frames 8 to 16, each retaining its distinct 'pcm_sha256' sample hash.

Byte-Level Splice and Container Reconstruction

Rather than decoding audio samples to floating-point representations and re-quantizing, the tool extracts the uncompressed PCM data bytes directly from each clip's data chunk. By verifying format parameters (channels, sample width, and frame rate) match exactly, the raw multichannel sample frames are concatenated directly into a continuous binary buffer. A new RIFF/WAV header is synthesized with updated chunk sizes and standard PCM format code (0x0001), ensuring bit-exact retention of the source audio data without generational loss.

Multichannel Frame Geometry and Provenance Intervals

Audio positions are indexed by complete multichannel audio frames rather than byte offsets. For example, a 16-bit stereo frame consists of 4 bytes (2 channels × 2 bytes/sample). Frame indexing starts at 0, and segments are mapped with half-open intervals [start_frame, end_frame), allowing seamless sequential mapping where clip N ends precisely where clip N+1 begins without gaps or overlaps.