{
  "name": "capture",
  "wireName": "tmux_capture",
  "source": {
    "repo": "libtmux/libtmux-ruby",
    "revision": "e3815d2b35a6c663f20769231e1d22b565f87038",
    "extractedRevision": "e3815d2b35a6c663f20769231e1d22b565f87038",
    "file": "gems/libtmux-mcp/lib/libtmux/mcp/catalog.rb",
    "line": 239
  },
  "description": "Read exact-pane screen/history rows preserving LF. Defaults: 200 lines, 65536 bytes, zero history lines, track=false. Limits: 1000 lines/history, 262144 bytes. UTF-8 or base64; truncation is separate from unknown history continuity. Tracked process cursors require tmux>=3.3 and a native process identity backend: Linux peer pidfds with matching PID namespaces, or Darwin kqueue process observation. Continuation returns an exact state row splice, not a live-output journal. Refuses capture after-hooks.",
  "schemaStatus": "runtime",
  "enabledByDefault": false,
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "history_lines": {
            "maximum": 1000,
            "minimum": 0,
            "type": "integer"
          },
          "max_bytes": {
            "maximum": 262144,
            "minimum": 1,
            "type": "integer"
          },
          "max_lines": {
            "maximum": 1000,
            "minimum": 1,
            "type": "integer"
          },
          "target": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "generation": {
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "id": {
                    "maxLength": 32,
                    "pattern": "^%[0-9]+$",
                    "type": "string"
                  },
                  "kind": {
                    "const": "pane"
                  }
                },
                "required": [
                  "generation",
                  "kind",
                  "id"
                ],
                "type": "object"
              }
            ]
          },
          "track": {
            "type": "boolean"
          }
        },
        "required": [
          "target"
        ],
        "type": "object"
      },
      {
        "additionalProperties": false,
        "properties": {
          "cursor": {
            "maxLength": 32,
            "pattern": "^[a-f0-9]{32}$",
            "type": "string"
          },
          "target": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "generation": {
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "id": {
                    "maxLength": 32,
                    "pattern": "^%[0-9]+$",
                    "type": "string"
                  },
                  "kind": {
                    "const": "pane"
                  }
                },
                "required": [
                  "generation",
                  "kind",
                  "id"
                ],
                "type": "object"
              }
            ]
          }
        },
        "required": [
          "target",
          "cursor"
        ],
        "type": "object"
      }
    ],
    "type": "object"
  },
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "data": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "bytes": {
                    "maximum": 262144,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "capture_id": {
                    "type": "string"
                  },
                  "encoding": {
                    "enum": [
                      "utf-8",
                      "base64"
                    ]
                  },
                  "history_continuity": {
                    "const": "unknown"
                  },
                  "interval": {
                    "additionalProperties": false,
                    "properties": {
                      "clock": {
                        "const": "monotonic_seconds"
                      },
                      "finished": {
                        "type": "number"
                      },
                      "started": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "clock",
                      "started",
                      "finished"
                    ],
                    "type": "object"
                  },
                  "mode": {
                    "const": "snapshot"
                  },
                  "next_cursor": {
                    "type": "string"
                  },
                  "process_generation": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "row_count": {
                    "maximum": 1000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "rows": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "type": "array"
                  },
                  "scope": {
                    "additionalProperties": false,
                    "properties": {
                      "history_lines": {
                        "maximum": 1000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "max_bytes": {
                        "maximum": 262144,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "max_lines": {
                        "maximum": 1000,
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "max_lines",
                      "max_bytes",
                      "history_lines"
                    ],
                    "type": "object"
                  },
                  "target": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "generation": {
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "maxLength": 32,
                            "pattern": "^%[0-9]+$",
                            "type": "string"
                          },
                          "kind": {
                            "const": "pane"
                          }
                        },
                        "required": [
                          "generation",
                          "kind",
                          "id"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "truncated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "target",
                  "capture_id",
                  "process_generation",
                  "encoding",
                  "row_count",
                  "bytes",
                  "truncated",
                  "history_continuity",
                  "interval",
                  "scope",
                  "mode",
                  "rows"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "base_capture_id": {
                    "type": "string"
                  },
                  "bytes": {
                    "maximum": 262144,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "capture_id": {
                    "type": "string"
                  },
                  "encoding": {
                    "enum": [
                      "utf-8",
                      "base64"
                    ]
                  },
                  "history_continuity": {
                    "const": "unknown"
                  },
                  "interval": {
                    "additionalProperties": false,
                    "properties": {
                      "clock": {
                        "const": "monotonic_seconds"
                      },
                      "finished": {
                        "type": "number"
                      },
                      "started": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "clock",
                      "started",
                      "finished"
                    ],
                    "type": "object"
                  },
                  "mode": {
                    "const": "delta"
                  },
                  "next_cursor": {
                    "type": "string"
                  },
                  "process_generation": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reset": {
                    "type": "boolean"
                  },
                  "row_count": {
                    "maximum": 1000,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "scope": {
                    "additionalProperties": false,
                    "properties": {
                      "history_lines": {
                        "maximum": 1000,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "max_bytes": {
                        "maximum": 262144,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "max_lines": {
                        "maximum": 1000,
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "max_lines",
                      "max_bytes",
                      "history_lines"
                    ],
                    "type": "object"
                  },
                  "splice": {
                    "additionalProperties": false,
                    "properties": {
                      "delete": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "rows": {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 1000,
                        "type": "array"
                      },
                      "start": {
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "start",
                      "delete",
                      "rows"
                    ],
                    "type": "object"
                  },
                  "target": {
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "generation": {
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "maxLength": 32,
                            "pattern": "^%[0-9]+$",
                            "type": "string"
                          },
                          "kind": {
                            "const": "pane"
                          }
                        },
                        "required": [
                          "generation",
                          "kind",
                          "id"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "truncated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "target",
                  "capture_id",
                  "process_generation",
                  "encoding",
                  "row_count",
                  "bytes",
                  "truncated",
                  "history_continuity",
                  "interval",
                  "scope",
                  "mode",
                  "base_capture_id",
                  "reset",
                  "splice",
                  "next_cursor"
                ],
                "type": "object"
              }
            ]
          },
          "ok": {
            "const": true
          }
        },
        "required": [
          "ok",
          "data"
        ],
        "type": "object"
      },
      {
        "additionalProperties": false,
        "properties": {
          "error": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "type": "string"
              },
              "delivery": {
                "enum": [
                  "not_sent",
                  "possibly_sent",
                  "observed"
                ]
              },
              "effects": {
                "additionalProperties": false,
                "properties": {
                  "created": {
                    "items": {
                      "oneOf": [
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^\\$[0-9]+$",
                              "type": "string"
                            },
                            "kind": {
                              "const": "session"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^@[0-9]+$",
                              "type": "string"
                            },
                            "kind": {
                              "const": "window"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^%[0-9]+$",
                              "type": "string"
                            },
                            "kind": {
                              "const": "pane"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id"
                          ],
                          "type": "object"
                        },
                        {
                          "additionalProperties": false,
                          "properties": {
                            "generation": {
                              "maxLength": 128,
                              "minLength": 1,
                              "type": "string"
                            },
                            "id": {
                              "maxLength": 32,
                              "pattern": "^@[0-9]+$",
                              "type": "string"
                            },
                            "index": {
                              "minimum": 0,
                              "type": "integer"
                            },
                            "kind": {
                              "const": "window_link"
                            },
                            "session_id": {
                              "maxLength": 32,
                              "pattern": "^\\$[0-9]+$",
                              "type": "string"
                            }
                          },
                          "required": [
                            "generation",
                            "kind",
                            "id",
                            "session_id",
                            "index"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "maxItems": 3,
                    "type": "array"
                  },
                  "state": {
                    "enum": [
                      "none",
                      "known",
                      "unknown"
                    ]
                  }
                },
                "required": [
                  "state",
                  "created"
                ],
                "type": "object"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "delivery"
            ],
            "type": "object"
          },
          "ok": {
            "const": false
          }
        },
        "required": [
          "ok",
          "error"
        ],
        "type": "object"
      }
    ]
  },
  "annotations": {
    "destructiveHint": false,
    "idempotentHint": false,
    "openWorldHint": false,
    "readOnlyHint": false
  }
}
