{
  "release": "1.2.70",
  "core": [
    {
      "name": "open",
      "title": "Open Rapier",
      "description": "Use this when the person wants a document, notes, a list, a table, a diagram they can drag to rearrange or a drawing that they can keep editing by hand, or asks to open or continue one. Use this too when they want to paint in watercolor or learn it: the paint is simulated, so pigment flows, mixes, blooms and dries on textured paper, and they can paint by hand beside your strokes on one sheet. Free, no account, in the chat or any browser. Not for an answer they will only read. Create {text, filename}, resume {document}, open a Note {document, note}, create one {document, note:\"new\", text, title} (title only there), or import a host file {file}. Put a new document's whole first text in open, drawings and paintings included: one call, no edit (a painting then waits for the person's editor). Returns revision and whole text when it fits a page; otherwise a document map. A browser code goes to show {target:\"pair\", code}. Share editor_url when available; keep document private.",
      "effect": "create",
      "class": "write",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 256
          },
          "url": {
            "type": "string",
            "maxLength": 2048,
            "description": "This Door's editor_url, through its authorized connection. Use alone; other URLs are not fetched."
          },
          "text": {
            "type": "string",
            "maxLength": 67108864
          },
          "filename": {
            "type": "string",
            "maxLength": 256
          },
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "title": {
            "type": "string",
            "maxLength": 256
          },
          "file": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 256
              },
              "resourceUri": {
                "type": "string",
                "maxLength": 8192
              }
            },
            "required": [
              "name",
              "resourceUri"
            ],
            "additionalProperties": false
          },
          "createToken": {
            "type": "string",
            "maxLength": 128
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "read",
      "title": "Read Rapier",
      "description": "Use this before you change a Rapier document, and when the person asks what it says or what they changed. Read exact text, a heading/fence map (as:\"outline\") or a PNG (as:\"image\") of the page or of the named block, heading or lines; a drawing's block gives it at full detail, even while it is open in Draw. query finds lines here; search lists Notes. Continue next_cursor with cursor alone. Check human context and omissions before editing. state:true reports pending work and the person’s presence; after_revision with wait_ms waits for their next change. guide returns instructions; guide resource URIs are not document IDs.",
      "effect": "read",
      "class": "read",
      "inputSchema": {
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "block": {
            "type": "string",
            "maxLength": 128
          },
          "heading": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxItems": 32
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "[first, last], 1-based, inclusive."
          },
          "query": {
            "type": "string",
            "maxLength": 2048,
            "description": "Literal text to find in this document."
          },
          "search": {
            "type": "string",
            "maxLength": 2048,
            "description": "Search the Notes store; \"\" lists all."
          },
          "as": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "text",
              "image",
              "outline"
            ]
          },
          "versions": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "cursor": {
            "type": "string",
            "maxLength": 256
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 32768
          },
          "state": {
            "type": "boolean"
          },
          "preferences": {
            "type": "boolean",
            "description": "Include editor preferences in state; omitted by default."
          },
          "history": {
            "type": "boolean"
          },
          "since": {
            "type": "string",
            "maxLength": 256
          },
          "comparison": {
            "type": "boolean"
          },
          "return_id": {
            "type": "string",
            "maxLength": 128
          },
          "after_revision": {
            "type": "integer",
            "minimum": 0,
            "description": "With wait_ms: return when the revision passes this."
          },
          "wait_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20000,
            "description": "Bounded wait (ms) for the next human revision."
          },
          "guide": {
            "type": "string",
            "maxLength": 32,
            "description": "Instructions only; use no other read selectors and no document.",
            "enum": [
              "overview",
              "draw",
              "water",
              "blocks"
            ]
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "required": [
                "guide"
              ]
            },
            "then": {
              "type": "object",
              "propertyNames": {
                "not": {
                  "enum": [
                    "note",
                    "block",
                    "heading",
                    "lines",
                    "query",
                    "search",
                    "as",
                    "versions",
                    "version",
                    "cursor",
                    "limit",
                    "state",
                    "preferences",
                    "history",
                    "since",
                    "comparison",
                    "return_id",
                    "after_revision",
                    "wait_ms"
                  ]
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "edit",
      "title": "Edit Rapier",
      "description": "Use this to change a document the person is working on in Rapier: the change shows at once, marked as yours, and undoes alone. Apply unique exact-text changes atomically as one undoable act (act is its id string), rename with filename, or set Note fields with note. At a moved numeric revision, literal edits apply if untouched since; whole-document replacement needs the current revision. A conflict returns current context; decide afresh. Drawings, painting, Water, comments and HTML objects use fenced text; a rapier-draw diagram stays live for the person, who drags its boxes and retypes its labels in the document; painting needs an open editor and an operation_id, and its result shows the painting.",
      "effect": "write",
      "class": "write",
      "inputSchema": {
        "type": "object",
        "properties": {
          "revision": {
            "type": [
              "integer",
              "string"
            ],
            "description": "From your latest read or open; a Note's is its sha256."
          },
          "changes": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "old": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "new": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "block": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "heading": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1024
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 256
                          },
                          "maxItems": 32
                        }
                      ]
                    }
                  },
                  "required": [
                    "old",
                    "new"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "after": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "insert": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "block": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "heading": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1024
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 256
                          },
                          "maxItems": 32
                        }
                      ]
                    }
                  },
                  "required": [
                    "after",
                    "insert"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 67108864
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 32
          },
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "turn_id": {
            "type": "string",
            "maxLength": 160,
            "description": "Groups acts for undo {turn_id}."
          },
          "label": {
            "type": "string",
            "description": "Short description of this edit in history."
          },
          "fields": {
            "type": "object",
            "properties": {
              "pinned": {
                "type": "boolean"
              },
              "colour": {
                "type": "string",
                "enum": [
                  "",
                  "red",
                  "orange",
                  "yellow",
                  "green",
                  "teal",
                  "blue",
                  "purple",
                  "pink",
                  "brown"
                ]
              },
              "section": {
                "type": "string",
                "maxLength": 48
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 128
                },
                "maxItems": 64
              },
              "archived": {
                "type": "boolean"
              },
              "trashed": {
                "type": "boolean"
              },
              "reminder": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "App only; {at} in ms."
              }
            },
            "additionalProperties": false,
            "description": "Note fields, with note and without changes."
          },
          "filename": {
            "type": "string",
            "maxLength": 256
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "undo",
      "title": "Undo Rapier work",
      "description": "Use this when the person wants a change of yours in Rapier taken back. Undo one act or one turn (act or turn_id, not both), preserving later work.",
      "effect": "write",
      "class": "write",
      "inputSchema": {
        "type": "object",
        "properties": {
          "act": {
            "type": "string",
            "maxLength": 256,
            "description": "From edit; pass act or turn_id."
          },
          "turn_id": {
            "type": "string",
            "maxLength": 160,
            "description": "Undo a whole turn; pass act or turn_id."
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "show",
      "title": "Show or ask in Rapier",
      "description": "Use this to point the person to a place in their Rapier document, ask them something there, or pair their browser with a 4-letter code. Present work or ask the person. An omitted target is inferred from its fields. A 4-letter browser code pairs that editor (target:\"pair\"); a connected workspace's owner first approves at owner_approval_url, then the person chooses ALLOW. pairing.status: none, code_shown, owner_approval_required, awaiting_allow or paired; only paired confirms pairing. Inspect actual presentation; a request is not proof the person saw it. A comparison leaves source unchanged. Later human navigation wins.",
      "effect": "view",
      "class": "sensitive-write",
      "inputSchema": {
        "type": "object",
        "properties": {
          "target": {
            "type": "string",
            "maxLength": 48,
            "enum": [
              "passage",
              "block",
              "pointer",
              "read_aloud",
              "playback",
              "comparison",
              "view",
              "preferences",
              "plugin",
              "file",
              "record",
              "attachment",
              "return",
              "note",
              "ask",
              "pair"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 67108864,
            "description": "Exact passage, or for comparison the whole alternative document."
          },
          "block": {
            "type": "string",
            "maxLength": 128
          },
          "heading": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxItems": 32
              }
            ]
          },
          "revision": {
            "type": [
              "integer",
              "string"
            ]
          },
          "act": {
            "type": "string",
            "maxLength": 256
          },
          "turn_id": {
            "type": "string",
            "maxLength": 160
          },
          "name": {
            "type": "string",
            "maxLength": 256,
            "description": "Comparison title or target:plugin name: math|mermaid|pdf|ocr|letters-field|letters-relief|letters-leaf|letters-arabesque|letters-silhouette|letters-gothic|letters-sugar|letters-illuminated-1490|letters-tuscan-1845|letters-renaissance-alphabet."
          },
          "words": {
            "type": "string",
            "maxLength": 160,
            "description": "Pointer label."
          },
          "view": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "formatted",
              "source",
              "notes"
            ]
          },
          "question": {
            "type": "string",
            "maxLength": 4096
          },
          "wait": {
            "type": "string",
            "maxLength": 32,
            "description": "ask: message (default) or selection.",
            "enum": [
              "selection",
              "message"
            ]
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 120000,
            "default": 20000
          },
          "preference": {
            "type": "string",
            "enum": [
              "accent",
              "theme",
              "fontSize",
              "defaultDocumentFont",
              "checker",
              "lineNums",
              "imageStorage",
              "inkColour",
              "inkWidth",
              "inkStylus",
              "wrap",
              "dim",
              "lineFit",
              "showPlayButton",
              "focus",
              "typewriter",
              "highlights",
              "highlightColor",
              "headings",
              "invertImageAlpha",
              "layout",
              "startIn",
              "notesSort",
              "notesLayout",
              "notesColour",
              "audioSpeed"
            ]
          },
          "value": {
            "type": [
              "string",
              "boolean"
            ],
            "description": "preferences: the setting; playback: false pauses, true plays."
          },
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "code": {
            "type": "string",
            "maxLength": 4,
            "description": "Browser pairing code (target:\"pair\")."
          },
          "close": {
            "type": "boolean"
          },
          "compare_id": {
            "type": "string",
            "maxLength": 128
          },
          "lifetime": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          },
          "after_return_id": {
            "type": "string",
            "maxLength": 128
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "required": [
                "target"
              ],
              "properties": {
                "target": {
                  "type": "string",
                  "const": "playback"
                }
              }
            },
            "then": {
              "required": [
                "revision",
                "value"
              ],
              "properties": {
                "value": {
                  "type": "boolean"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "export",
      "title": "Save or export Rapier",
      "description": "Use this when the person wants their Rapier document as a file to keep: Markdown, Word, PDF, plain text, or one HTML file that opens and edits offline. to:\"file\" (default) delivers markdown, html, page, txt, docx or pdf (html is the whole editor with the document inside, editable offline); to:\"save\" saves to the bound destination; to:\"clipboard\" copies a passage as plain, markdown, formatted or complete. to:\"sync\" alone syncs the Notes store and can replace files. On the hosted Door, page, docx and pdf need the person's paired, open editor; a self-hosted server can provide a renderer. Inspect delivery; export never publishes a website.",
      "effect": "durable",
      "class": "sensitive-write",
      "inputSchema": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "markdown",
              "html",
              "page",
              "txt",
              "docx",
              "pdf",
              "plain",
              "formatted",
              "complete"
            ]
          },
          "to": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "file",
              "save",
              "clipboard",
              "sync"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 67108864
          },
          "block": {
            "type": "string",
            "maxLength": 128
          },
          "heading": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxItems": 32
              }
            ]
          },
          "revision": {
            "type": [
              "integer",
              "string"
            ]
          },
          "compare_id": {
            "type": "string",
            "maxLength": 128
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "required": [
                "to"
              ],
              "properties": {
                "to": {
                  "type": "string",
                  "const": "sync"
                }
              }
            },
            "then": {
              "type": "object",
              "propertyNames": {
                "not": {
                  "enum": [
                    "format",
                    "text",
                    "block",
                    "heading",
                    "revision",
                    "compare_id"
                  ]
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "convert",
      "title": "Convert pictures with Rapier",
      "description": "Convert pictures to JPEG XL, or JPEG XL back. Each file's own kind decides: a JPEG, PNG, WebP, AVIF, GIF or video becomes JPEG XL (a JPEG at lossless is carried exactly and restores byte for byte); a .jxl that carries its JPEG gives back that JPEG byte for byte, any other .jxl a PNG. quality: lossless, high (default) or medium; effort 1-9 (default 7: higher is smaller and slower). At most 32 files and 32 MB in all per call, pictures to 400 megapixels in all. Returns each file's name, sizes and what was kept; the files go to the person.",
      "effect": "create",
      "class": "write",
      "inputSchema": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "maxLength": 256,
                  "minLength": 1,
                  "description": "The file name, with its extension."
                },
                "data": {
                  "type": "string",
                  "maxLength": 44739244,
                  "contentEncoding": "base64",
                  "description": "The file's exact bytes, base64."
                }
              },
              "required": [
                "name",
                "data"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 32
          },
          "quality": {
            "type": "string",
            "maxLength": 16,
            "enum": [
              "lossless",
              "high",
              "medium"
            ]
          },
          "effort": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "required": [
          "files"
        ],
        "additionalProperties": false
      }
    }
  ],
  "mcp": [
    {
      "name": "open",
      "title": "Open Rapier",
      "description": "Use this when the person wants a document, notes, a list, a table, a diagram they can drag to rearrange or a drawing that they can keep editing by hand, or asks to open or continue one. Use this too when they want to paint in watercolor or learn it: the paint is simulated, so pigment flows, mixes, blooms and dries on textured paper, and they can paint by hand beside your strokes on one sheet. Free, no account, in the chat or any browser. Not for an answer they will only read. Create {text, filename}, resume {document}, open a Note {document, note}, create one {document, note:\"new\", text, title} (title only there), or import a host file {file}. Put a new document's whole first text in open, drawings and paintings included: one call, no edit (a painting then waits for the person's editor). Returns revision and whole text when it fits a page; otherwise a document map. A browser code goes to show {target:\"pair\", code}. Share editor_url when available; keep document private.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 256
          },
          "url": {
            "type": "string",
            "maxLength": 2048,
            "description": "This Door's editor_url, through its authorized connection. Use alone; other URLs are not fetched."
          },
          "text": {
            "type": "string",
            "maxLength": 67108864
          },
          "filename": {
            "type": "string",
            "maxLength": 256
          },
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "title": {
            "type": "string",
            "maxLength": 256
          },
          "file": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 256
              },
              "resourceUri": {
                "type": "string",
                "maxLength": 8192
              }
            },
            "required": [
              "name",
              "resourceUri"
            ],
            "additionalProperties": false
          },
          "createToken": {
            "type": "string",
            "maxLength": 128
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "title": "Open Rapier",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "securitySchemes": [
        {
          "type": "noauth"
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "noauth"
          }
        ],
        "website.rapier/tool-class": "write",
        "ui": {
          "visibility": [
            "model",
            "app"
          ],
          "resourceUri": "ui://rapier/editor"
        },
        "openai/toolInvocation/invoking": "Opening Rapier",
        "openai/toolInvocation/invoked": "Rapier is ready"
      }
    },
    {
      "name": "read",
      "title": "Read Rapier",
      "description": "Use this before you change a Rapier document, and when the person asks what it says or what they changed. Read exact text, a heading/fence map (as:\"outline\") or a PNG (as:\"image\") of the page or of the named block, heading or lines; a drawing's block gives it at full detail, even while it is open in Draw. query finds lines here; search lists Notes. Continue next_cursor with cursor alone. Check human context and omissions before editing. state:true reports pending work and the person’s presence; after_revision with wait_ms waits for their next change. guide returns instructions; guide resource URIs are not document IDs.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 256,
            "description": "From open; not needed with guide."
          },
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "block": {
            "type": "string",
            "maxLength": 128
          },
          "heading": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxItems": 32
              }
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "[first, last], 1-based, inclusive."
          },
          "query": {
            "type": "string",
            "maxLength": 2048,
            "description": "Literal text to find in this document."
          },
          "search": {
            "type": "string",
            "maxLength": 2048,
            "description": "Search the Notes store; \"\" lists all."
          },
          "as": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "text",
              "image",
              "outline"
            ]
          },
          "versions": {
            "type": "boolean"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "cursor": {
            "type": "string",
            "maxLength": 256
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 32768
          },
          "state": {
            "type": "boolean"
          },
          "preferences": {
            "type": "boolean",
            "description": "Include editor preferences in state; omitted by default."
          },
          "history": {
            "type": "boolean"
          },
          "since": {
            "type": "string",
            "maxLength": 256
          },
          "comparison": {
            "type": "boolean"
          },
          "return_id": {
            "type": "string",
            "maxLength": 128
          },
          "after_revision": {
            "type": "integer",
            "minimum": 0,
            "description": "With wait_ms: return when the revision passes this."
          },
          "wait_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 20000,
            "description": "Bounded wait (ms) for the next human revision."
          },
          "guide": {
            "type": "string",
            "maxLength": 32,
            "description": "Instructions only; use no other read selectors and no document.",
            "enum": [
              "overview",
              "draw",
              "water",
              "blocks"
            ]
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "required": []
      },
      "annotations": {
        "title": "Read Rapier",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "securitySchemes": [
        {
          "type": "noauth"
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "noauth"
          }
        ],
        "website.rapier/tool-class": "read",
        "ui": {
          "visibility": [
            "model",
            "app"
          ]
        }
      }
    },
    {
      "name": "edit",
      "title": "Edit Rapier",
      "description": "Use this to change a document the person is working on in Rapier: the change shows at once, marked as yours, and undoes alone. Apply unique exact-text changes atomically as one undoable act (act is its id string), rename with filename, or set Note fields with note. At a moved numeric revision, literal edits apply if untouched since; whole-document replacement needs the current revision. A conflict returns current context; decide afresh. Drawings, painting, Water, comments and HTML objects use fenced text; a rapier-draw diagram stays live for the person, who drags its boxes and retypes its labels in the document; painting needs an open editor and an operation_id, and its result shows the painting.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 256
          },
          "revision": {
            "type": [
              "integer",
              "string"
            ],
            "description": "From your latest read or open; a Note's is its sha256."
          },
          "changes": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "old": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "new": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "block": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "heading": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1024
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 256
                          },
                          "maxItems": 32
                        }
                      ]
                    }
                  },
                  "required": [
                    "old",
                    "new"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "after": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "insert": {
                      "type": "string",
                      "maxLength": 67108864
                    },
                    "block": {
                      "type": "string",
                      "maxLength": 128
                    },
                    "heading": {
                      "oneOf": [
                        {
                          "type": "string",
                          "maxLength": 1024
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 256
                          },
                          "maxItems": 32
                        }
                      ]
                    }
                  },
                  "required": [
                    "after",
                    "insert"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "maxLength": 67108864
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 32
          },
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "turn_id": {
            "type": "string",
            "maxLength": 160,
            "description": "Groups acts for undo {turn_id}."
          },
          "label": {
            "type": "string",
            "description": "Short description of this edit in history."
          },
          "fields": {
            "type": "object",
            "properties": {
              "pinned": {
                "type": "boolean"
              },
              "colour": {
                "type": "string",
                "enum": [
                  "",
                  "red",
                  "orange",
                  "yellow",
                  "green",
                  "teal",
                  "blue",
                  "purple",
                  "pink",
                  "brown"
                ]
              },
              "section": {
                "type": "string",
                "maxLength": 48
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 128
                },
                "maxItems": 64
              },
              "archived": {
                "type": "boolean"
              },
              "trashed": {
                "type": "boolean"
              },
              "reminder": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "App only; {at} in ms."
              }
            },
            "additionalProperties": false,
            "description": "Note fields, with note and without changes."
          },
          "filename": {
            "type": "string",
            "maxLength": 256
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "required": [
          "document",
          "revision"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "title": "Edit Rapier",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "securitySchemes": [
        {
          "type": "noauth"
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "noauth"
          }
        ],
        "website.rapier/tool-class": "write",
        "ui": {
          "visibility": [
            "model",
            "app"
          ]
        }
      }
    },
    {
      "name": "undo",
      "title": "Undo Rapier work",
      "description": "Use this when the person wants a change of yours in Rapier taken back. Undo one act or one turn (act or turn_id, not both), preserving later work.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 256
          },
          "act": {
            "type": "string",
            "maxLength": 256,
            "description": "From edit; pass act or turn_id."
          },
          "turn_id": {
            "type": "string",
            "maxLength": 160,
            "description": "Undo a whole turn; pass act or turn_id."
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "document"
        ]
      },
      "annotations": {
        "title": "Undo Rapier work",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "securitySchemes": [
        {
          "type": "noauth"
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "noauth"
          }
        ],
        "website.rapier/tool-class": "write",
        "ui": {
          "visibility": [
            "model",
            "app"
          ]
        }
      }
    },
    {
      "name": "show",
      "title": "Show or ask in Rapier",
      "description": "Use this to point the person to a place in their Rapier document, ask them something there, or pair their browser with a 4-letter code. Present work or ask the person. An omitted target is inferred from its fields. A 4-letter browser code pairs that editor (target:\"pair\"); a connected workspace's owner first approves at owner_approval_url, then the person chooses ALLOW. pairing.status: none, code_shown, owner_approval_required, awaiting_allow or paired; only paired confirms pairing. Inspect actual presentation; a request is not proof the person saw it. A comparison leaves source unchanged. Later human navigation wins.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 256
          },
          "target": {
            "type": "string",
            "maxLength": 48,
            "enum": [
              "passage",
              "block",
              "pointer",
              "read_aloud",
              "playback",
              "comparison",
              "view",
              "preferences",
              "plugin",
              "file",
              "record",
              "attachment",
              "return",
              "note",
              "ask",
              "pair"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 67108864,
            "description": "Exact passage, or for comparison the whole alternative document."
          },
          "block": {
            "type": "string",
            "maxLength": 128
          },
          "heading": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxItems": 32
              }
            ]
          },
          "revision": {
            "type": [
              "integer",
              "string"
            ]
          },
          "act": {
            "type": "string",
            "maxLength": 256
          },
          "turn_id": {
            "type": "string",
            "maxLength": 160
          },
          "name": {
            "type": "string",
            "maxLength": 256,
            "description": "Comparison title or target:plugin name: math|mermaid|pdf|ocr|letters-field|letters-relief|letters-leaf|letters-arabesque|letters-silhouette|letters-gothic|letters-sugar|letters-illuminated-1490|letters-tuscan-1845|letters-renaissance-alphabet."
          },
          "words": {
            "type": "string",
            "maxLength": 160,
            "description": "Pointer label."
          },
          "view": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "formatted",
              "source",
              "notes"
            ]
          },
          "question": {
            "type": "string",
            "maxLength": 4096
          },
          "wait": {
            "type": "string",
            "maxLength": 32,
            "description": "ask: message (default) or selection.",
            "enum": [
              "selection",
              "message"
            ]
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 120000,
            "default": 20000
          },
          "preference": {
            "type": "string",
            "enum": [
              "accent",
              "theme",
              "fontSize",
              "defaultDocumentFont",
              "checker",
              "lineNums",
              "imageStorage",
              "inkColour",
              "inkWidth",
              "inkStylus",
              "wrap",
              "dim",
              "lineFit",
              "showPlayButton",
              "focus",
              "typewriter",
              "highlights",
              "highlightColor",
              "headings",
              "invertImageAlpha",
              "layout",
              "startIn",
              "notesSort",
              "notesLayout",
              "notesColour",
              "audioSpeed"
            ]
          },
          "value": {
            "type": [
              "string",
              "boolean"
            ],
            "description": "preferences: the setting; playback: false pauses, true plays."
          },
          "note": {
            "type": "string",
            "maxLength": 160,
            "minLength": 1
          },
          "code": {
            "type": "string",
            "maxLength": 4,
            "description": "Browser pairing code (target:\"pair\")."
          },
          "close": {
            "type": "boolean"
          },
          "compare_id": {
            "type": "string",
            "maxLength": 128
          },
          "lifetime": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30
          },
          "after_return_id": {
            "type": "string",
            "maxLength": 128
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "document"
        ]
      },
      "annotations": {
        "title": "Show or ask in Rapier",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "securitySchemes": [
        {
          "type": "noauth"
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "noauth"
          }
        ],
        "website.rapier/tool-class": "sensitive-write",
        "ui": {
          "visibility": [
            "model",
            "app"
          ]
        }
      }
    },
    {
      "name": "export",
      "title": "Save or export Rapier",
      "description": "Use this when the person wants their Rapier document as a file to keep: Markdown, Word, PDF, plain text, or one HTML file that opens and edits offline. to:\"file\" (default) delivers markdown, html, page, txt, docx or pdf (html is the whole editor with the document inside, editable offline); to:\"save\" saves to the bound destination; to:\"clipboard\" copies a passage as plain, markdown, formatted or complete. to:\"sync\" alone syncs the Notes store and can replace files. On the hosted Door, page, docx and pdf need the person's paired, open editor; a self-hosted server can provide a renderer. Inspect delivery; export never publishes a website.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 256
          },
          "format": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "markdown",
              "html",
              "page",
              "txt",
              "docx",
              "pdf",
              "plain",
              "formatted",
              "complete"
            ]
          },
          "to": {
            "type": "string",
            "maxLength": 32,
            "enum": [
              "file",
              "save",
              "clipboard",
              "sync"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 67108864
          },
          "block": {
            "type": "string",
            "maxLength": 128
          },
          "heading": {
            "oneOf": [
              {
                "type": "string",
                "maxLength": 1024
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 256
                },
                "maxItems": 32
              }
            ]
          },
          "revision": {
            "type": [
              "integer",
              "string"
            ]
          },
          "compare_id": {
            "type": "string",
            "maxLength": 128
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "additionalProperties": false,
        "required": [
          "document"
        ]
      },
      "annotations": {
        "title": "Save or export Rapier",
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "securitySchemes": [
        {
          "type": "noauth"
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "noauth"
          }
        ],
        "website.rapier/tool-class": "sensitive-write",
        "ui": {
          "visibility": [
            "model",
            "app"
          ]
        }
      }
    },
    {
      "name": "convert",
      "title": "Convert pictures with Rapier",
      "description": "Use this when the person wants pictures converted to JPEG XL, or JPEG XL pictures converted back. Free, on the person's own device. Opens Rapier's converter in this app's view where the app can show one: pictures from the chat passed in files open there and convert at once, and the person can add more and saves the results. The pictures never reach Rapier's server: the view reads them from the chat on the person's device. Without a view, answers with the converter's link (https://rapier.website/jxl) for the person. files: the chat's pictures; omit it to let the person pick them. quality: lossless, high (default) or medium; effort 1-9 (default 7: higher is smaller and slower). To convert files in your own sandbox, run npx rapier-jxl <file|folder>: it prints each size before and after.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "download_url": {
                  "type": "string",
                  "maxLength": 8192
                },
                "file_id": {
                  "type": "string",
                  "maxLength": 256
                },
                "mime_type": {
                  "type": "string",
                  "maxLength": 128
                },
                "file_name": {
                  "type": "string",
                  "maxLength": 256
                }
              },
              "required": [
                "download_url",
                "file_id"
              ],
              "additionalProperties": false
            },
            "maxItems": 32
          },
          "quality": {
            "type": "string",
            "maxLength": 16,
            "enum": [
              "lossless",
              "high",
              "medium"
            ]
          },
          "effort": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9
          },
          "agent": {
            "type": "string",
            "description": "Your display name on acts; never grants authority."
          },
          "operation_id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1
          }
        },
        "required": [],
        "additionalProperties": false
      },
      "annotations": {
        "title": "Convert pictures with Rapier",
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "securitySchemes": [
        {
          "type": "noauth"
        }
      ],
      "_meta": {
        "securitySchemes": [
          {
            "type": "noauth"
          }
        ],
        "website.rapier/tool-class": "write",
        "ui": {
          "visibility": [
            "model",
            "app"
          ],
          "resourceUri": "ui://rapier/editor"
        },
        "openai/fileParams": [
          "files"
        ],
        "openai/toolInvocation/invoking": "Opening the JPEG XL converter",
        "openai/toolInvocation/invoked": "The converter is ready"
      }
    }
  ]
}
