{
  "name": "com.syncaissa.pitch-lab.reanalyze",
  "kind": "command",
  "title": "Re-analyze recording",
  "description": "Run the pYIN engine again with a new threshold.",
  "inputSchema": {
    "type": "object",
    "required": [
      "recordingId",
      "threshold"
    ],
    "properties": {
      "recordingId": {
        "type": "string",
        "pattern": "^[A-Za-z0-9-]{1,64}$"
      },
      "threshold": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "additionalProperties": false
  },
  "risk": "read",
  "privacy": "internal",
  "physical": false,
  "callers": [
    "human",
    "ai"
  ],
  "native": {
    "protocol": "function",
    "target": "wasm:pitch-engine",
    "request": {
      "export": "reanalyze",
      "args": [
        "{{arguments.recordingId}}",
        "{{arguments.threshold}}"
      ]
    },
    "timeoutMs": 2000
  }
}
