Tools for agents: Rational PCM WAV gain
Apply explicit gain to PCM audio and receive a processed WAV with per-channel saturation counts.
Connect with MCP
{
"mcpServers": {
"super-agent-tools": {
"url": "https://app.getsupers.com/sites/agent-wav-gain/mcp"
}
}
}Use this URL in any client supporting remote Streamable HTTP MCP. Calls return structured JSON; inputs are processed without persistence.
Call apply_wav_gain
Accepts plain base64 mono/stereo integer PCM WAV, 8/16/24/32-bit, nonempty and within 524288 decoded bytes and 15 seconds. gain is a linear amplitude multiplier supplied as an integer or quoted finite decimal/fraction string; JSON floats and booleans fail. Gain 1 preserves PCM, 0 produces digital silence, and negative gain also inverts polarity. Samples are multiplied exactly, rounded to the nearest integer with ties to even, then clamped to the representable range. Clipping counts count rounded values outside that range before clamping, per zero-based channel; they do not diagnose clipping already present in the input. 8-bit PCM is unsigned with silence at 128; wider PCM is signed little-endian. Rate, channels, width and frame count are preserved. No dither, fades, automatic normalization, limiter, LUFS targeting or resampling occurs. Metadata is discarded. Decode audio_base64 to save the result; checksums cover the full WAV and raw PCM respectively. No files or URLs are accepted and audio is not persisted.
Input and output schemas
{
"name": "apply_wav_gain",
"title": "Rational PCM WAV gain",
"description": "Multiply integer PCM samples by an exact rational gain, round ties to even and saturate to the sample range. Return a WAV and per-channel clipping counts.",
"inputSchema": {
"properties": {
"audio_base64": {
"title": "Audio Base64",
"type": "string"
},
"gain": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"title": "Gain"
}
},
"required": [
"audio_base64",
"gain"
],
"title": "apply_wav_gainArguments",
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"title": "apply_wav_gainDictOutput",
"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-gain/call
Content-Type: application/json
{
"audio_base64": "UklGRkQAAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAAZGF0YSAAAAAAEAAgAPAA4AAQACAA8ADgABAAIADwAOAAEAAgAPAA4A==",
"gain": "1/2"
}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.