{
  "name": "close",
  "wireName": "tmux_close",
  "source": {
    "repo": "libtmux/libtmux-ruby",
    "revision": "e3815d2b35a6c663f20769231e1d22b565f87038",
    "extractedRevision": "e3815d2b35a6c663f20769231e1d22b565f87038",
    "file": "gems/libtmux-mcp/lib/libtmux/mcp/catalog.rb",
    "line": 247
  },
  "description": "Destroy one exact session, window or pane. Opt-in destructive operation; closing a session or window also removes its contained topology. Never selects by name or closes the daemon directly. Returns the final tmux client outcome.",
  "schemaStatus": "runtime",
  "enabledByDefault": false,
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "target": {
            "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"
              }
            ]
          }
        },
        "required": [
          "target"
        ],
        "type": "object"
      }
    ],
    "type": "object"
  },
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "data": {
            "additionalProperties": false,
            "properties": {
              "client_exit_status": {
                "const": 0
              },
              "delivery": {
                "const": "observed"
              },
              "target": {
                "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"
                  }
                ]
              }
            },
            "required": [
              "target",
              "delivery",
              "client_exit_status"
            ],
            "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": true,
    "idempotentHint": false,
    "openWorldHint": false,
    "readOnlyHint": false
  }
}
