[
  {
    "name": "guide",
    "description": "Read the Ewe Sound AI guide, connection instructions and editing rules.",
    "inputSchema": {
      "type": "object",
      "properties": {},
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": true,
      "destructiveHint": false,
      "openWorldHint": false
    }
  },
  {
    "name": "get_state",
    "description": "Inspect all tabs, active sound format and duration, selection in seconds and samples, peak, clipboard, undo history and playback/recording.",
    "inputSchema": {
      "type": "object",
      "properties": {},
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": true,
      "destructiveHint": false,
      "openWorldHint": false
    }
  },
  {
    "name": "new_sound",
    "description": "Create an empty sound in a NEW tab; preserve all existing tabs.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "sample_rate": {
          "type": "integer",
          "minimum": 8000,
          "maximum": 192000
        },
        "channels": {
          "type": "integer",
          "minimum": 1,
          "maximum": 8
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "open_sound",
    "description": "Open an audio file in a NEW tab, preserving unsaved work. Input up to 64 MiB; supported formats depend on the WebView decoder. GUI Save asks for a destination.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "import_sound",
    "description": "Replace selection or insert at cursor with an audio file, converted to current rate/channels. One undo step. Absolute path; up to 64 MiB.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "save_sound",
    "description": "Write a WAV COPY to an absolute .wav path. Existing files require overwrite:true. Preserve GUI save destination and dirty state.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        },
        "bit_depth": {
          "type": "integer",
          "enum": [
            16,
            24,
            32
          ]
        },
        "overwrite": {
          "type": "boolean"
        }
      },
      "required": [
        "path"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "activate_sound",
    "description": "Switch to a tab by its zero-based index from get_state.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        }
      },
      "required": [
        "index"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "select",
    "description": "Set selection start/end in SECONDS. Omit end to put the cursor at start; all:true selects the whole sound. Range must fit the sound.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "start": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "end": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "all": {
          "type": "boolean"
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "generate",
    "description": "Insert at cursor or REPLACE the selection with tone or silence. One undo step; 0.001..300 seconds. Clear selection before appending.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "tone",
            "silence"
          ]
        },
        "seconds": {
          "type": "number",
          "minimum": 0.001,
          "maximum": 300
        },
        "waveform": {
          "type": "string",
          "enum": [
            "sine",
            "square",
            "sawtooth",
            "triangle"
          ]
        },
        "frequency": {
          "type": "number",
          "minimum": 1,
          "maximum": 96000
        },
        "amplitude": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "seconds"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "effect",
    "description": "Apply an effect to the selection, or the whole sound when there is no selection. One undo step. amplify requires db (-60..60); normalize defaults to -1 dBFS (-60..0).",
    "inputSchema": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "amplify",
            "normalize",
            "fadeIn",
            "fadeOut",
            "reverse",
            "silence"
          ]
        },
        "db": {
          "type": "number",
          "minimum": -60,
          "maximum": 60
        }
      },
      "required": [
        "action"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "edit",
    "description": "Cut/copy/delete/trim require a non-empty selection. Paste replaces selection or inserts at cursor, converting internal clipboard audio to destination format.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "cut",
            "copy",
            "paste",
            "delete",
            "trim"
          ]
        }
      },
      "required": [
        "action"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "channels",
    "description": "Convert the whole sound to 1..8 channels, using the editor mixer. One undo step.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 8
        }
      },
      "required": [
        "count"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "history",
    "description": "List undo history, undo, redo or jump to a zero-based index. Affects the active tab.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "list",
            "undo",
            "redo",
            "jump"
          ]
        },
        "index": {
          "type": "integer",
          "minimum": 0,
          "maximum": 99
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "view",
    "description": "Fit the whole waveform, zoom to selection, zoom in or out.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "fit",
            "selection",
            "in",
            "out"
          ]
        }
      },
      "required": [
        "action"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "compare_waveforms",
    "description": "Show two waveforms stacked on a shared time scale. Choose reference_sound from get_state.sounds; left playback checkboxes are controlled by play_active and play_reference. Mix averages checked sounds aligned at time zero; audio and history are unchanged. get_state.comparison reports the visible reference, enabled playback sounds and timeline.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "reference_sound": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000
        },
        "play_active": {
          "type": "boolean"
        },
        "play_reference": {
          "type": "boolean"
        }
      },
      "required": [
        "enabled"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": false,
      "openWorldHint": false
    }
  },
  {
    "name": "transport",
    "description": "Play, pause or stop playback. Does not start microphone recording.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "enum": [
            "play",
            "pause",
            "stop"
          ]
        }
      },
      "required": [
        "action"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "agent_control",
    "description": "Enable or disable the local HTTP endpoint for this session. Disabling also disconnects CLI/HTTP clients.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        }
      },
      "required": [
        "enabled"
      ],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "openWorldHint": false
    }
  },
  {
    "name": "analyze_sound",
    "description": "Measure the active sound or a range in seconds: peak/RMS/DC, near-full-scale samples/frames and longest runs. Optional waveform bins preserve per-channel min/max and RMS. Silence dB values are null. Does not edit.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "start": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "end": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "bins": {
          "type": "integer",
          "minimum": 0,
          "maximum": 4096
        },
        "threshold": {
          "type": "number",
          "minimum": 0.000001,
          "maximum": 1
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": true,
      "destructiveHint": false,
      "openWorldHint": false
    }
  },
  {
    "name": "prepare_clip",
    "description": "Create a NEW unsaved clip tab, preserving its source. Trim, mono, band-limited resample, peak/RMS level, edge/tail fades or loop crossfade. Returns recipe, source measurements and output analysis. Default: whole sound, mono, 48 kHz, -2 dB peak, 1 ms edges, 250 ms tail. No file is saved.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "at": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "secs": {
          "type": "number",
          "minimum": 0.000001,
          "maximum": 1000000000000
        },
        "mono": {
          "type": "boolean"
        },
        "sample_rate": {
          "type": "integer",
          "minimum": 8000,
          "maximum": 192000
        },
        "peak": {
          "type": "number",
          "minimum": 0.000001,
          "maximum": 0.98
        },
        "peak_db": {
          "type": "number",
          "minimum": -120,
          "maximum": -0.175478486150103
        },
        "rms": {
          "type": "number",
          "minimum": 0.000001,
          "maximum": 0.98
        },
        "edge": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "tail": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "loop": {
          "type": "boolean"
        },
        "fade": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000
        },
        "peakOver": {
          "type": "string",
          "enum": [
            "recording"
          ]
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": false,
      "openWorldHint": false
    }
  },
  {
    "name": "ffmpeg_info",
    "description": "Inspect the replaceable external FFmpeg executable and LGPL licence. Fails clearly for a missing, GPL or nonfree build. No download or file writes.",
    "inputSchema": {
      "type": "object",
      "properties": {},
      "required": [],
      "additionalProperties": false
    },
    "annotations": {
      "readOnlyHint": true,
      "destructiveHint": false,
      "openWorldHint": false
    }
  }
]
