MCPconceptTools

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

tool MCPlatest

capture_since

capture_since( cursor?: string, maxLines?: integer, paneId: string, waitMs?: integer, )
tool [source]

Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. What a pane has printed since you last looked. Call it once with no cursor to start watching and get the current screen; keep the cursor it returns and pass it back each time after that, and you are charged only for what is new. This is the tool for watching a build, a log, or a test run — not a capture_pane loop. Set waitMs to block until something arrives rather than returning empty. Reports the stream in the order it was written, so a program that draws by moving the cursor (a progress bar, a full-screen TUI) reads jumbled here — capture_pane renders those.

MCP request method
tools/call Send capture_since as the tool name, with the arguments below.

Arguments#

  • cursor? (string) #

    The cursor from your previous capture_since. Omit on the first call.

    pattern
    "^ltxc1\\.[0-9a-f]{32}\\.(?:0|[1-9][0-9]*)$"
  • maxLines? (integer) #

    Keep at most this many lines, from the end. Defaults to the server limit.

    maximum
    9007199254740991
    exclusiveMinimum
    0
  • paneId (string) #

    Stable pane id, e.g. %1.

    pattern
    "^%\\d+$"
  • waitMs? (integer) #

    Wait up to this long for new output before answering. Default 0.

    minimum
    0
    maximum
    9007199254740991

Result#

Returns object

  • byteClamped (boolean) #

    Whether the byte ceiling shortened this result.

  • cursor (string | null) #

    Pass this to the next capture_since call; null means streaming was unavailable.

    Matches one or more variants.

  • droppedLines (integer) #

    minimum
    -9007199254740991
    maximum
    9007199254740991
  • effectiveTimeoutMs (integer) #

    The wait ceiling applied; zero when this call did not wait on a live stream.

    minimum
    -9007199254740991
    maximum
    9007199254740991
  • missedBytes (integer) #

    Output that scrolled past before this read reached it. Non-zero means you fell behind.

    minimum
    -9007199254740991
    maximum
    9007199254740991
  • omittedBytes (integer) #

    Result bytes omitted after capture or streaming.

    minimum
    -9007199254740991
    maximum
    9007199254740991
  • paneId (string) #

    Stable pane id, e.g. %1.

    pattern
    "^%\\d+$"
  • rangeClamped (boolean) #

    Whether result limits shortened a grid capture.

  • returnedBytes (integer) #

    minimum
    -9007199254740991
    maximum
    9007199254740991
  • seeded (boolean) #

    True when this call started the watch and returned the screen.

  • streaming (boolean) #

    False when no control connection was available and this fell back to capturing.

  • text (string) #

No other properties are accepted.

Annotations#

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false

Protocol data#

Use the complete advertised contract for validation and client integration.

Input schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cursor": {
"description": "The cursor from your previous capture_since. Omit on the first call.",
"pattern": "^ltxc1\\.[0-9a-f]{32}\\.(?:0|[1-9][0-9]*)$",
"type": "string"
},
"maxLines": {
"description": "Keep at most this many lines, from the end. Defaults to the server limit.",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
"paneId": {
"description": "Stable pane id, e.g. %1.",
"pattern": "^%\\d+$",
"type": "string"
},
"waitMs": {
"description": "Wait up to this long for new output before answering. Default 0.",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
}
},
"required": [
"paneId"
],
"type": "object"
}
Output schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"byteClamped": {
"description": "Whether the byte ceiling shortened this result.",
"type": "boolean"
},
"cursor": {
"anyOf": [
{
"pattern": "^ltxc1\\.[0-9a-f]{32}\\.(?:0|[1-9][0-9]*)$",
"type": "string"
},
{
"type": "null"
}
],
"description": "Pass this to the next capture_since call; null means streaming was unavailable."
},
"droppedLines": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"effectiveTimeoutMs": {
"description": "The wait ceiling applied; zero when this call did not wait on a live stream.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"missedBytes": {
"description": "Output that scrolled past before this read reached it. Non-zero means you fell behind.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"omittedBytes": {
"description": "Result bytes omitted after capture or streaming.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"paneId": {
"description": "Stable pane id, e.g. %1.",
"pattern": "^%\\d+$",
"type": "string"
},
"rangeClamped": {
"description": "Whether result limits shortened a grid capture.",
"type": "boolean"
},
"returnedBytes": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"seeded": {
"description": "True when this call started the watch and returned the screen.",
"type": "boolean"
},
"streaming": {
"description": "False when no control connection was available and this fell back to capturing.",
"type": "boolean"
},
"text": {
"type": "string"
}
},
"required": [
"byteClamped",
"cursor",
"droppedLines",
"effectiveTimeoutMs",
"missedBytes",
"paneId",
"omittedBytes",
"rangeClamped",
"returnedBytes",
"seeded",
"streaming",
"text"
],
"type": "object"
}
Esc

Type to search.

Reference previewOpen reference