{
  "name": "wait_for_exit",
  "wireName": "wait_for_exit",
  "source": {
    "repo": "libtmux/libtmux-ts",
    "revision": "f7b03a361f7c97677406b4ab937b2772ddb5f7dd",
    "extractedRevision": "f7b03a361f7c97677406b4ab937b2772ddb5f7dd",
    "file": "packages/mcp/src/tools/wait.ts",
    "line": 618
  },
  "description": "Inspect tmux metadata; accepts no client-supplied executable input. Wait until the program in a pane exits and return its exit status or signal. Use it for a pane you did not start, such as a person's build or a server someone launched; for run_program and start_program, their own results report the exit. A pane that closes on exit still reports its status; a pane killed from outside during the wait has none and answers gone within about two seconds, and a pane id that is already gone is not found. A pane at a shell prompt exits only when the shell does: for a command typed into it, use run_shell_command or wait_for_text. Requires tmux 3.8 or newer.",
  "schemaStatus": "runtime",
  "inputSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
      "paneId": {
        "description": "Stable pane id, e.g. %1.",
        "pattern": "^%\\d+$",
        "type": "string"
      },
      "timeoutMs": {
        "description": "How long to wait for the exit: 30 seconds when omitted, clamped by the server ceiling; the result reports what was used, and timed_out leaves the program running.",
        "exclusiveMinimum": 0,
        "maximum": 9007199254740991,
        "type": "integer"
      }
    },
    "required": [
      "paneId"
    ],
    "type": "object"
  },
  "outputSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "properties": {
      "effectiveTimeoutMs": {
        "description": "The timeout enforced.",
        "maximum": 9007199254740991,
        "minimum": -9007199254740991,
        "type": "integer"
      },
      "exitStatus": {
        "anyOf": [
          {
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          },
          {
            "type": "null"
          }
        ],
        "description": "The exit status, as tmux read it from the pane's process: null when a signal ended it, with signal set, or when it has not exited."
      },
      "outcome": {
        "description": "completed: the program ended; exitStatus holds its status, or is null with signal set. timed_out: it still runs; call again to keep waiting. gone: the pane was removed without an exit status. cancelled: the request was cancelled.",
        "enum": [
          "completed",
          "timed_out",
          "gone",
          "cancelled"
        ],
        "type": "string"
      },
      "signal": {
        "description": "The signal that ended the program, such as \"SIGTERM\"; otherwise null.",
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "effectiveTimeoutMs",
      "exitStatus",
      "outcome",
      "signal"
    ],
    "type": "object"
  },
  "annotations": {
    "destructiveHint": true,
    "idempotentHint": false,
    "openWorldHint": true,
    "readOnlyHint": false
  },
  "meta": {
    "com.git-pull.libtmux-mcp/capability": {
      "amplifiesFutureInput": false,
      "annotations": {
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true,
        "readOnlyHint": false
      },
      "description": "Inspect tmux metadata; accepts no client-supplied executable input. Wait until the program in a pane exits and return its exit status or signal. Use it for a pane you did not start, such as a person's build or a server someone launched; for run_program and start_program, their own results report the exit. A pane that closes on exit still reports its status; a pane killed from outside during the wait has none and answers gone within about two seconds, and a pane id that is already gone is not found. A pane at a shell prompt exits only when the shell does: for a command typed into it, use run_shell_command or wait_for_text. Requires tmux 3.8 or newer.",
      "inputLiteralization": {},
      "inputSchema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "paneId": {
            "description": "Stable pane id, e.g. %1.",
            "pattern": "^%\\d+$",
            "type": "string"
          },
          "timeoutMs": {
            "description": "How long to wait for the exit: 30 seconds when omitted, clamped by the server ceiling; the result reports what was used, and timed_out leaves the program running.",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991,
            "type": "integer"
          }
        },
        "required": [
          "paneId"
        ],
        "type": "object"
      },
      "mayExposeSecrets": true,
      "mayReturnUntrustedContent": true,
      "name": "wait_for_exit",
      "nestedAuthority": [],
      "outputClasses": [
        "tmux-metadata"
      ],
      "outputSchema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "properties": {
          "effectiveTimeoutMs": {
            "description": "The timeout enforced.",
            "maximum": 9007199254740991,
            "minimum": -9007199254740991,
            "type": "integer"
          },
          "exitStatus": {
            "anyOf": [
              {
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "The exit status, as tmux read it from the pane's process: null when a signal ended it, with signal set, or when it has not exited."
          },
          "outcome": {
            "description": "completed: the program ended; exitStatus holds its status, or is null with signal set. timed_out: it still runs; call again to keep waiting. gone: the pane was removed without an exit status. cancelled: the request was cancelled.",
            "enum": [
              "completed",
              "timed_out",
              "gone",
              "cancelled"
            ],
            "type": "string"
          },
          "signal": {
            "description": "The signal that ended the program, such as \"SIGTERM\"; otherwise null.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "effectiveTimeoutMs",
          "exitStatus",
          "outcome",
          "signal"
        ],
        "type": "object"
      },
      "processReach": "none",
      "title": "Wait for a pane's program to exit",
      "tmuxEffects": [
        "observe"
      ],
      "toolset": "inspect"
    }
  }
}
