Ctrl K
ComunidadGuías…

lhm.plugin.json

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
{
  "identifier": "hiai-gg-docsmint",
  "name": "DocsMint",
  "version": "2.1.5",
  "author": "HiAi-gg",
  "authorUrl": "https://github.com/HiAi-gg",
  "category": "developer",
  "homepage": "https://docsmint.com/mcp/connect?source=lobehub_mcp",
  "cloudEndpoint": "https://docsmint.com/mcp",
  "icon": "https://raw.githubusercontent.com/HiAi-gg/docsmint/main/frontend/static/logo-dark.png",
  "description": "Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.",
  "tags": [
    "knowledge-base",
    "mcp",
    "rag",
    "graphrag",
    "semantic-search",
    "wiki",
    "self-hosted",
    "documents"
  ],
  "tools": [
    {
      "name": "find_documents",
      "description": "Find readable documents in the active scope. Use mode=list for paginated browsing by folder or tag UUID; use mode=search for hybrid text and semantic retrieval with tag names.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "list",
                "description": "Select the list operation explicitly."
              },
              "folderId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "categoryId": {
                "description": "Filter by effective category UUID, including inherited folder placement.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "visibility": {
                "description": "Optional document visibility filter; never expands access.",
                "type": "string",
                "enum": [
                  "private",
                  "shared",
                  "public"
                ]
              },
              "rootOnly": {
                "description": "Return only documents without a folder; cannot combine with folderId.",
                "type": "boolean"
              },
              "tag": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "tagIds": {
                "description": "Filter by tag UUIDs; cannot combine with the legacy tag field.",
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID returned by the corresponding list or read operation."
                }
              },
              "tagMatch": {
                "description": "Require all supplied tags by default, or any supplied tag.",
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "q": {
                "description": "Literal case-insensitive title/content filter; does not invoke semantic search.",
                "type": "string"
              },
              "updatedFrom": {
                "description": "Inclusive updated timestamp lower bound, with timezone.",
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "updatedTo": {
                "description": "Exclusive updated timestamp upper bound, with timezone.",
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "sortBy": {
                "description": "Stable server-side sort field; defaults to updatedAt.",
                "type": "string",
                "enum": [
                  "updatedAt",
                  "createdAt",
                  "title"
                ]
              },
              "sortOrder": {
                "description": "Sort direction, descending by default with an ID tie-breaker.",
                "type": "string",
                "enum": [
                  "asc",
                  "desc"
                ]
              },
              "page": {
                "description": "One-based page number; defaults to the API first page.",
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "limit": {
                "description": "Maximum documents per page, up to 1000.",
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "mode"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "query"
                      ]
                    },
                    {
                      "required": [
                        "includeDiagnostics"
                      ]
                    },
                    {
                      "required": [
                        "includeChunks"
                      ]
                    },
                    {
                      "required": [
                        "folder"
                      ]
                    },
                    {
                      "required": [
                        "tags"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "search",
                "description": "Select the search operation explicitly."
              },
              "query": {
                "type": "string",
                "minLength": 1,
                "description": "Text to search in the original language."
              },
              "includeDiagnostics": {
                "description": "Include redacted diagnostic details; omitted by default.",
                "type": "boolean"
              },
              "includeChunks": {
                "description": "Include matching text chunks only when requested.",
                "type": "boolean"
              },
              "folder": {
                "description": "Optional folder UUID filter for search.",
                "type": "string"
              },
              "tags": {
                "description": "Optional tag names; all supplied names must match.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "limit": {
                "description": "Maximum results to return, up to 100.",
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "mode",
              "query"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "folderId"
                      ]
                    },
                    {
                      "required": [
                        "categoryId"
                      ]
                    },
                    {
                      "required": [
                        "visibility"
                      ]
                    },
                    {
                      "required": [
                        "rootOnly"
                      ]
                    },
                    {
                      "required": [
                        "tag"
                      ]
                    },
                    {
                      "required": [
                        "tagIds"
                      ]
                    },
                    {
                      "required": [
                        "tagMatch"
                      ]
                    },
                    {
                      "required": [
                        "q"
                      ]
                    },
                    {
                      "required": [
                        "updatedFrom"
                      ]
                    },
                    {
                      "required": [
                        "updatedTo"
                      ]
                    },
                    {
                      "required": [
                        "sortBy"
                      ]
                    },
                    {
                      "required": [
                        "sortOrder"
                      ]
                    },
                    {
                      "required": [
                        "page"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        ],
        "properties": {
          "mode": {
            "anyOf": [
              {
                "type": "string",
                "const": "list",
                "description": "Select the list operation explicitly."
              },
              {
                "type": "string",
                "const": "search",
                "description": "Select the search operation explicitly."
              }
            ]
          },
          "folderId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "categoryId": {
            "description": "Filter by effective category UUID, including inherited folder placement.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "visibility": {
            "description": "Optional document visibility filter; never expands access.",
            "type": "string",
            "enum": [
              "private",
              "shared",
              "public"
            ]
          },
          "rootOnly": {
            "description": "Return only documents without a folder; cannot combine with folderId.",
            "type": "boolean"
          },
          "tag": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "tagIds": {
            "description": "Filter by tag UUIDs; cannot combine with the legacy tag field.",
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "UUID returned by the corresponding list or read operation."
            }
          },
          "tagMatch": {
            "description": "Require all supplied tags by default, or any supplied tag.",
            "type": "string",
            "enum": [
              "all",
              "any"
            ]
          },
          "q": {
            "description": "Literal case-insensitive title/content filter; does not invoke semantic search.",
            "type": "string"
          },
          "updatedFrom": {
            "description": "Inclusive updated timestamp lower bound, with timezone.",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "updatedTo": {
            "description": "Exclusive updated timestamp upper bound, with timezone.",
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "sortBy": {
            "description": "Stable server-side sort field; defaults to updatedAt.",
            "type": "string",
            "enum": [
              "updatedAt",
              "createdAt",
              "title"
            ]
          },
          "sortOrder": {
            "description": "Sort direction, descending by default with an ID tie-breaker.",
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          },
          "page": {
            "description": "One-based page number; defaults to the API first page.",
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "limit": {
            "anyOf": [
              {
                "description": "Maximum documents per page, up to 1000.",
                "type": "integer",
                "minimum": 1,
                "maximum": 1000
              },
              {
                "description": "Maximum results to return, up to 100.",
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              }
            ]
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "description": "Text to search in the original language."
          },
          "includeDiagnostics": {
            "description": "Include redacted diagnostic details; omitted by default.",
            "type": "boolean"
          },
          "includeChunks": {
            "description": "Include matching text chunks only when requested.",
            "type": "boolean"
          },
          "folder": {
            "description": "Optional folder UUID filter for search.",
            "type": "string"
          },
          "tags": {
            "description": "Optional tag names; all supplied names must match.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "list"
              },
              "result": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        },
                        "folderId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "folderName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "categoryId": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "categoryName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "createdAt": {
                                "type": "string"
                              },
                              "documentCount": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ],
                            "additionalProperties": {}
                          }
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "content",
                        "folderId",
                        "folderName",
                        "categoryId",
                        "categoryName",
                        "createdAt",
                        "updatedAt",
                        "tags"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "total": {
                    "type": "number"
                  },
                  "page": {
                    "type": "number"
                  },
                  "limit": {
                    "type": "number"
                  }
                },
                "required": [
                  "items",
                  "total",
                  "page",
                  "limit"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "search"
              },
              "result": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "snippet": {
                          "type": "string"
                        },
                        "score": {
                          "type": "number"
                        },
                        "folder_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "folder_name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "color": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "createdAt": {
                                "type": "string"
                              },
                              "documentCount": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "color"
                            ],
                            "additionalProperties": {}
                          }
                        },
                        "chunks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "chunkIndex": {
                                "type": "number"
                              },
                              "chunkText": {
                                "type": "string"
                              },
                              "charStart": {
                                "type": "number"
                              },
                              "charEnd": {
                                "type": "number"
                              },
                              "score": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "chunkIndex",
                              "chunkText",
                              "charStart",
                              "charEnd",
                              "score"
                            ],
                            "additionalProperties": {}
                          }
                        }
                      },
                      "required": [
                        "id",
                        "title",
                        "snippet",
                        "score",
                        "folder_id",
                        "folder_name",
                        "created_at",
                        "updated_at"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "total": {
                    "type": "number"
                  },
                  "page": {
                    "type": "number"
                  },
                  "limit": {
                    "type": "number"
                  },
                  "diagnostics": {
                    "type": "object",
                    "properties": {
                      "graphAttempted": {
                        "type": "boolean"
                      },
                      "graphFailed": {
                        "type": "boolean"
                      },
                      "graphContribution": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "graphAttempted",
                      "graphFailed",
                      "graphContribution"
                    ],
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "items",
                  "total",
                  "page",
                  "limit"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string"
              },
              "scopedResults": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "additionalProperties": false
                    },
                    "categoryId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "type": "string",
                              "const": "list"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "title": {
                                        "type": "string"
                                      },
                                      "content": {
                                        "type": "string"
                                      },
                                      "folderId": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "folderName": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "categoryId": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "categoryName": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "createdAt": {
                                        "type": "string"
                                      },
                                      "updatedAt": {
                                        "type": "string"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "color": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "createdAt": {
                                              "type": "string"
                                            },
                                            "documentCount": {
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "name",
                                            "color"
                                          ],
                                          "additionalProperties": {}
                                        }
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "title",
                                      "content",
                                      "folderId",
                                      "folderName",
                                      "categoryId",
                                      "categoryName",
                                      "createdAt",
                                      "updatedAt",
                                      "tags"
                                    ],
                                    "additionalProperties": {}
                                  }
                                },
                                "total": {
                                  "type": "number"
                                },
                                "page": {
                                  "type": "number"
                                },
                                "limit": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "items",
                                "total",
                                "page",
                                "limit"
                              ],
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "operation",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "type": "string",
                              "const": "search"
                            },
                            "result": {
                              "type": "object",
                              "properties": {
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "title": {
                                        "type": "string"
                                      },
                                      "snippet": {
                                        "type": "string"
                                      },
                                      "score": {
                                        "type": "number"
                                      },
                                      "folder_id": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "folder_name": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "created_at": {
                                        "type": "string"
                                      },
                                      "updated_at": {
                                        "type": "string"
                                      },
                                      "tags": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "color": {
                                              "type": [
                                                "string",
                                                "null"
                                              ]
                                            },
                                            "createdAt": {
                                              "type": "string"
                                            },
                                            "documentCount": {
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "name",
                                            "color"
                                          ],
                                          "additionalProperties": {}
                                        }
                                      },
                                      "chunks": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "chunkIndex": {
                                              "type": "number"
                                            },
                                            "chunkText": {
                                              "type": "string"
                                            },
                                            "charStart": {
                                              "type": "number"
                                            },
                                            "charEnd": {
                                              "type": "number"
                                            },
                                            "score": {
                                              "type": "number"
                                            }
                                          },
                                          "required": [
                                            "chunkIndex",
                                            "chunkText",
                                            "charStart",
                                            "charEnd",
                                            "score"
                                          ],
                                          "additionalProperties": {}
                                        }
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "title",
                                      "snippet",
                                      "score",
                                      "folder_id",
                                      "folder_name",
                                      "created_at",
                                      "updated_at"
                                    ],
                                    "additionalProperties": {}
                                  }
                                },
                                "total": {
                                  "type": "number"
                                },
                                "page": {
                                  "type": "number"
                                },
                                "limit": {
                                  "type": "number"
                                },
                                "diagnostics": {
                                  "type": "object",
                                  "properties": {
                                    "graphAttempted": {
                                      "type": "boolean"
                                    },
                                    "graphFailed": {
                                      "type": "boolean"
                                    },
                                    "graphContribution": {
                                      "type": "boolean"
                                    }
                                  },
                                  "required": [
                                    "graphAttempted",
                                    "graphFailed",
                                    "graphContribution"
                                  ],
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "items",
                                "total",
                                "page",
                                "limit"
                              ],
                              "additionalProperties": {}
                            }
                          },
                          "required": [
                            "operation",
                            "result"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "workspace",
                    "categoryId",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "operation",
              "scopedResults"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "read_document",
      "description": "Read one document by UUID. Choose detail for content and metadata, markdown for portable export, or versions for saved revisions and snapshots. All views are read-only.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "view": {
                "type": "string",
                "const": "detail",
                "description": "Select the detail operation explicitly."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "view",
              "id"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "onlySnapshots"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "view": {
                "type": "string",
                "const": "markdown",
                "description": "Select the markdown operation explicitly."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "view",
              "id"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "onlySnapshots"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "view": {
                "type": "string",
                "const": "versions",
                "description": "Select the versions operation explicitly."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "onlySnapshots": {
                "description": "When true, return only named snapshots.",
                "type": "boolean"
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "view",
              "id"
            ]
          }
        ],
        "properties": {
          "view": {
            "anyOf": [
              {
                "type": "string",
                "const": "detail",
                "description": "Select the detail operation explicitly."
              },
              {
                "type": "string",
                "const": "markdown",
                "description": "Select the markdown operation explicitly."
              },
              {
                "type": "string",
                "const": "versions",
                "description": "Select the versions operation explicitly."
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "onlySnapshots": {
            "description": "When true, return only named snapshots.",
            "type": "boolean"
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "detail"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "ownerId": {
                    "type": "string"
                  },
                  "folderId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "categoryId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "contentJson": {},
                  "metadata": {},
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "private",
                      "shared",
                      "public"
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "documentCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "folderName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "ownerId",
                  "folderId",
                  "categoryId",
                  "title",
                  "content",
                  "visibility",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "markdown"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "workspaceId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "workspaceSlug": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "markdown": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  }
                },
                "required": [
                  "markdown"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "versions"
              },
              "result": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "documentId": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "contentJson": {},
                    "createdBy": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "label": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "description": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isSnapshot": {
                      "type": "boolean"
                    },
                    "restoredFrom": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "documentId",
                    "content",
                    "createdBy",
                    "createdAt"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "save_document",
      "description": "Create or update one document. Use action=create for a new document or action=update for an existing one; batch_documents handles the same placement change across multiple existing documents. Creation requires write access; content edits require edit access, and placement changes may require write access. Content or placement changes queue normal indexing.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "Document title, from 1 to 500 characters."
              },
              "content": {
                "type": "string",
                "description": "Markdown document content; an empty string clears the content on update."
              },
              "folderId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "categoryId": {
                "description": "Optional category UUID; null clears the explicit category.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "id"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "Document title, from 1 to 500 characters."
              },
              "content": {
                "type": "string",
                "description": "Markdown document content; an empty string clears the content on update."
              },
              "folderId": {
                "description": "Optional folder UUID; null clears the placement on update.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "categoryId": {
                "description": "Optional category UUID; null clears the explicit category.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action",
              "id"
            ]
          }
        ],
        "properties": {
          "action": {
            "anyOf": [
              {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              }
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "description": "Document title, from 1 to 500 characters."
          },
          "content": {
            "type": "string",
            "description": "Markdown document content; an empty string clears the content on update."
          },
          "folderId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              {
                "description": "Optional folder UUID; null clears the placement on update.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            ]
          },
          "categoryId": {
            "description": "Optional category UUID; null clears the explicit category.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "create"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "ownerId": {
                    "type": "string"
                  },
                  "folderId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "categoryId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "contentJson": {},
                  "metadata": {},
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "private",
                      "shared",
                      "public"
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "documentCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "folderName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "ownerId",
                  "folderId",
                  "categoryId",
                  "title",
                  "content",
                  "visibility",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "update"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "ownerId": {
                    "type": "string"
                  },
                  "folderId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "categoryId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "content": {
                    "type": "string"
                  },
                  "contentJson": {},
                  "metadata": {},
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "private",
                      "shared",
                      "public"
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "color": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "documentCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "color"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "folderName": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "ownerId",
                  "folderId",
                  "categoryId",
                  "title",
                  "content",
                  "visibility",
                  "createdAt",
                  "updatedAt"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "delete_document",
      "description": "Move one document to trash without purging content or versions. Use batch_documents(action=trash) for multiple explicit IDs. Requires write access and an explicit delete request; permanently_delete_document is a separate irreversible action.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "list_workspace_structure",
      "description": "Discover permitted spaces with kind=workspaces, including empty spaces; use returned workspaceId for scoped operations. List folders, categories, or tags; set kind=folders for root folders or children of parentId. Unselected reads cover all granted scopes when supported by the host.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "workspaces",
                "description": "Discover every workspace granted to this connection, including empty ones."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "kind"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "parentId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "folders",
                "description": "Select the folders operation explicitly."
              },
              "parentId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "kind"
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "categories",
                "description": "Select the categories operation explicitly."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "kind"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "parentId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "tags",
                "description": "Select the tags operation explicitly."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "kind"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "parentId"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        ],
        "properties": {
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "const": "workspaces",
                "description": "Discover every workspace granted to this connection, including empty ones."
              },
              {
                "type": "string",
                "const": "folders",
                "description": "Select the folders operation explicitly."
              },
              {
                "type": "string",
                "const": "categories",
                "description": "Select the categories operation explicitly."
              },
              {
                "type": "string",
                "const": "tags",
                "description": "Select the tags operation explicitly."
              }
            ]
          },
          "parentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "workspaces"
              },
              "result": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "entireWorkspace": {
                      "type": "boolean"
                    },
                    "categoryIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "slug",
                    "entireWorkspace",
                    "categoryIds"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "folders"
              },
              "result": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "categories"
              },
              "result": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "order": {
                          "type": "number"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        },
                        "documentCount": {
                          "type": "number"
                        },
                        "folderCount": {
                          "type": "number"
                        },
                        "apiMode": {
                          "type": "string",
                          "enum": [
                            "unavailable",
                            "global",
                            "category"
                          ]
                        },
                        "apiPermissionRead": {
                          "type": "boolean"
                        },
                        "apiPermissionEdit": {
                          "type": "boolean"
                        },
                        "apiPermissionWrite": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "order",
                        "createdAt",
                        "updatedAt",
                        "apiMode",
                        "apiPermissionRead",
                        "apiPermissionEdit",
                        "apiPermissionWrite"
                      ],
                      "additionalProperties": {}
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "order": {
                          "type": "number"
                        },
                        "createdAt": {
                          "type": "string"
                        },
                        "updatedAt": {
                          "type": "string"
                        },
                        "documentCount": {
                          "type": "number"
                        },
                        "folderCount": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "order",
                        "createdAt",
                        "updatedAt"
                      ],
                      "additionalProperties": {}
                    }
                  ]
                }
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "tags"
              },
              "result": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "color": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "documentCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "color"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string"
              },
              "scopedResults": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "additionalProperties": false
                    },
                    "categoryId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "type": "string",
                              "const": "workspaces"
                            },
                            "result": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "slug": {
                                    "type": "string"
                                  },
                                  "entireWorkspace": {
                                    "type": "boolean"
                                  },
                                  "categoryIds": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "format": "uuid",
                                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                    }
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "slug",
                                  "entireWorkspace",
                                  "categoryIds"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "operation",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "type": "string",
                              "const": "folders"
                            },
                            "result": {
                              "type": "array",
                              "items": {
                                "$ref": "#/$defs/__schema0"
                              }
                            }
                          },
                          "required": [
                            "operation",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "type": "string",
                              "const": "categories"
                            },
                            "result": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "order": {
                                        "type": "number"
                                      },
                                      "createdAt": {
                                        "type": "string"
                                      },
                                      "updatedAt": {
                                        "type": "string"
                                      },
                                      "documentCount": {
                                        "type": "number"
                                      },
                                      "folderCount": {
                                        "type": "number"
                                      },
                                      "apiMode": {
                                        "type": "string",
                                        "enum": [
                                          "unavailable",
                                          "global",
                                          "category"
                                        ]
                                      },
                                      "apiPermissionRead": {
                                        "type": "boolean"
                                      },
                                      "apiPermissionEdit": {
                                        "type": "boolean"
                                      },
                                      "apiPermissionWrite": {
                                        "type": "boolean"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "order",
                                      "createdAt",
                                      "updatedAt",
                                      "apiMode",
                                      "apiPermissionRead",
                                      "apiPermissionEdit",
                                      "apiPermissionWrite"
                                    ],
                                    "additionalProperties": {}
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "order": {
                                        "type": "number"
                                      },
                                      "createdAt": {
                                        "type": "string"
                                      },
                                      "updatedAt": {
                                        "type": "string"
                                      },
                                      "documentCount": {
                                        "type": "number"
                                      },
                                      "folderCount": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "order",
                                      "createdAt",
                                      "updatedAt"
                                    ],
                                    "additionalProperties": {}
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "operation",
                            "result"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "operation": {
                              "type": "string",
                              "const": "tags"
                            },
                            "result": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "color": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "createdAt": {
                                    "type": "string"
                                  },
                                  "documentCount": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name",
                                  "color"
                                ],
                                "additionalProperties": {}
                              }
                            }
                          },
                          "required": [
                            "operation",
                            "result"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "workspace",
                    "categoryId",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "operation",
              "scopedResults"
            ],
            "additionalProperties": false
          }
        ],
        "$defs": {
          "__schema0": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "ownerId": {
                "type": "string"
              },
              "parentId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              },
              "categoryId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order": {
                "type": "number"
              },
              "documentCount": {
                "type": "number"
              },
              "subfolderCount": {
                "type": "number"
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "folderId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "folderName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "categoryId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "categoryName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "documentCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ],
                        "additionalProperties": {}
                      }
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "folderId",
                    "folderName",
                    "categoryId",
                    "categoryName",
                    "createdAt",
                    "updatedAt",
                    "tags"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "id",
              "ownerId",
              "parentId",
              "name",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": {}
          }
        }
      }
    },
    {
      "name": "save_folder",
      "description": "Create or update a folder. action=update can rename or move an existing folder; the API enforces category boundaries and queues affected documents for reindexing.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Non-empty human-readable name or title."
              },
              "parentId": {
                "description": "Optional parent folder UUID; null selects the root.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "categoryId": {
                "description": "Optional category UUID; null clears the explicit category.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action",
              "name"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "id"
                      ]
                    },
                    {
                      "required": [
                        "order"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Non-empty human-readable name or title."
              },
              "parentId": {
                "description": "Optional parent folder UUID; null selects the root.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "categoryId": {
                "description": "Optional category UUID; null clears the explicit category.",
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID returned by the corresponding list or read operation."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "order": {
                "description": "New non-negative display order.",
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action",
              "id"
            ]
          }
        ],
        "properties": {
          "action": {
            "anyOf": [
              {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Non-empty human-readable name or title."
          },
          "parentId": {
            "description": "Optional parent folder UUID; null selects the root.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              {
                "type": "null"
              }
            ]
          },
          "categoryId": {
            "description": "Optional category UUID; null clears the explicit category.",
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "order": {
            "description": "New non-negative display order.",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "create"
              },
              "result": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "update"
              },
              "result": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ],
        "$defs": {
          "__schema0": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "ownerId": {
                "type": "string"
              },
              "parentId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              },
              "categoryId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order": {
                "type": "number"
              },
              "documentCount": {
                "type": "number"
              },
              "subfolderCount": {
                "type": "number"
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "folderId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "folderName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "categoryId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "categoryName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "documentCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ],
                        "additionalProperties": {}
                      }
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "folderId",
                    "folderName",
                    "categoryId",
                    "categoryName",
                    "createdAt",
                    "updatedAt",
                    "tags"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "id",
              "ownerId",
              "parentId",
              "name",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": {}
          }
        }
      }
    },
    {
      "name": "delete_folder",
      "description": "Delete a folder while preserving its documents; child folders and documents are detached under the API rules. Requires write access.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "save_category",
      "description": "Create or update a workspace category. Full workspace write access is required; category-scoped credentials cannot manage categories.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Non-empty human-readable name or title."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action",
              "name"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "id"
                      ]
                    },
                    {
                      "required": [
                        "order"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255,
                "description": "Non-empty human-readable name or title."
              },
              "order": {
                "description": "New non-negative display order.",
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action",
              "id"
            ]
          }
        ],
        "properties": {
          "action": {
            "anyOf": [
              {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255,
            "description": "Non-empty human-readable name or title."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "order": {
            "description": "New non-negative display order.",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "create"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "order": {
                    "type": "number"
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "documentCount": {
                    "type": "number"
                  },
                  "folderCount": {
                    "type": "number"
                  },
                  "apiMode": {
                    "type": "string",
                    "enum": [
                      "unavailable",
                      "global",
                      "category"
                    ]
                  },
                  "apiPermissionRead": {
                    "type": "boolean"
                  },
                  "apiPermissionEdit": {
                    "type": "boolean"
                  },
                  "apiPermissionWrite": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "order",
                  "createdAt",
                  "updatedAt",
                  "apiMode",
                  "apiPermissionRead",
                  "apiPermissionEdit",
                  "apiPermissionWrite"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "update"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "order": {
                    "type": "number"
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "updatedAt": {
                    "type": "string"
                  },
                  "documentCount": {
                    "type": "number"
                  },
                  "folderCount": {
                    "type": "number"
                  },
                  "apiMode": {
                    "type": "string",
                    "enum": [
                      "unavailable",
                      "global",
                      "category"
                    ]
                  },
                  "apiPermissionRead": {
                    "type": "boolean"
                  },
                  "apiPermissionEdit": {
                    "type": "boolean"
                  },
                  "apiPermissionWrite": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "order",
                  "createdAt",
                  "updatedAt",
                  "apiMode",
                  "apiPermissionRead",
                  "apiPermissionEdit",
                  "apiPermissionWrite"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "delete_category",
      "description": "Delete a workspace category and detach its documents without deleting them. Requires full workspace write access; category-scoped credentials are denied.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "save_tag",
      "description": "Create or update a workspace tag. Full workspace write access is required; renaming or recoloring a tag causes affected documents to be reindexed.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "Non-empty human-readable name or title."
              },
              "color": {
                "description": "Optional tag color, at most 20 characters.",
                "type": "string",
                "maxLength": 20
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action",
              "name"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "id"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "description": "Non-empty human-readable name or title."
              },
              "color": {
                "description": "Optional tag color, at most 20 characters.",
                "type": "string",
                "maxLength": 20
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "action",
              "id"
            ]
          }
        ],
        "properties": {
          "action": {
            "anyOf": [
              {
                "type": "string",
                "const": "create",
                "description": "Select the create operation explicitly."
              },
              {
                "type": "string",
                "const": "update",
                "description": "Select the update operation explicitly."
              }
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Non-empty human-readable name or title."
          },
          "color": {
            "description": "Optional tag color, at most 20 characters.",
            "type": "string",
            "maxLength": 20
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "create"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "documentCount": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "color"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "update"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "documentCount": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "color"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "delete_tag",
      "description": "Delete a workspace tag and remove its document assignments. Full workspace write access is required; documents themselves remain.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "set_document_tag",
      "description": "Add or remove an existing tag assignment on one document. Use batch_documents for the same tag action across multiple explicit IDs. Requires edit access to each document; action=remove preserves the tag itself.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "add",
              "remove"
            ],
            "description": "Add or remove exactly one tag assignment."
          },
          "documentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "tagId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "action",
          "documentId",
          "tagId"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "add"
              },
              "result": {
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "tagId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "assigned": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "documentId",
                  "tagId",
                  "assigned"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "remove"
              },
              "result": {
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "tagId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "removed": {
                    "type": "boolean",
                    "const": true
                  }
                },
                "required": [
                  "documentId",
                  "tagId",
                  "removed"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "create_snapshot",
      "description": "Save a named snapshot of an existing document before a planned change. The snapshot can later be restored with restore_document_version.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Snapshot label, from 1 to 200 characters."
          },
          "description": {
            "description": "Optional snapshot note, at most 1000 characters.",
            "type": "string",
            "maxLength": 1000
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "documentId",
          "label"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "documentId": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "contentJson": {},
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "isSnapshot": {
            "type": "boolean"
          },
          "restoredFrom": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "documentId",
          "content",
          "createdBy",
          "createdAt"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "restore_document_version",
      "description": "Restore content from a version or snapshot listed by read_document(view=versions). This changes current content and queues indexing; it does not restore a trashed document.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "versionId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "documentId",
          "versionId"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ownerId": {
            "type": "string"
          },
          "folderId": {
            "type": [
              "string",
              "null"
            ]
          },
          "categoryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "contentJson": {},
          "metadata": {},
          "visibility": {
            "type": "string",
            "enum": [
              "private",
              "shared",
              "public"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "color": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "createdAt": {
                  "type": "string"
                },
                "documentCount": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "color"
              ],
              "additionalProperties": {}
            }
          },
          "folderName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "ownerId",
          "folderId",
          "categoryId",
          "title",
          "content",
          "visibility",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "explore_graph",
      "description": "Explore graph relations from readable seed documents. mode=neighbors traverses one document without a query; mode=search ranks relations from one or more seed IDs with optional query text.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "neighbors",
                "description": "Select the neighbors operation explicitly."
              },
              "documentId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID returned by the corresponding list or read operation."
              },
              "limit": {
                "description": "Maximum results to return, up to 100.",
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "mode",
              "documentId"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "docIds"
                      ]
                    },
                    {
                      "required": [
                        "query"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "const": "search",
                "description": "Select the search operation explicitly."
              },
              "docIds": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID returned by the corresponding list or read operation."
                },
                "description": "One to 50 authorized seed document UUIDs."
              },
              "query": {
                "description": "Optional graph relevance query, at most 2000 characters.",
                "type": "string",
                "maxLength": 2000
              },
              "limit": {
                "description": "Maximum results to return, up to 100.",
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "mode",
              "docIds"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "documentId"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        ],
        "properties": {
          "mode": {
            "anyOf": [
              {
                "type": "string",
                "const": "neighbors",
                "description": "Select the neighbors operation explicitly."
              },
              {
                "type": "string",
                "const": "search",
                "description": "Select the search operation explicitly."
              }
            ]
          },
          "documentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "limit": {
            "description": "Maximum results to return, up to 100.",
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "docIds": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "UUID returned by the corresponding list or read operation."
            },
            "description": "One to 50 authorized seed document UUIDs."
          },
          "query": {
            "description": "Optional graph relevance query, at most 2000 characters.",
            "type": "string",
            "maxLength": 2000
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "neighbors"
              },
              "result": {
                "type": "object",
                "properties": {
                  "related": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "docId": {
                          "type": "string"
                        },
                        "relationType": {
                          "type": "string"
                        },
                        "hopDistance": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "docId",
                        "relationType",
                        "hopDistance"
                      ],
                      "additionalProperties": {}
                    }
                  }
                },
                "required": [
                  "related"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "search"
              },
              "result": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string"
                  },
                  "entities": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "type"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "relatedDocs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "docId": {
                          "type": "string"
                        },
                        "relationType": {
                          "type": "string"
                        },
                        "hopDistance": {
                          "type": "number"
                        },
                        "title": {
                          "type": "string"
                        },
                        "snippet": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "docId",
                        "relationType",
                        "hopDistance",
                        "title",
                        "snippet"
                      ],
                      "additionalProperties": {}
                    }
                  }
                },
                "required": [
                  "entities",
                  "relatedDocs"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "get_document_index_status",
      "description": "Read current indexing and pipeline status for one document without starting work. Use refresh_document_index only when an explicit retry is intended.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "documentId"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string"
          },
          "embeddingStatus": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "ready",
              "failed",
              "stale"
            ]
          },
          "activeGenerationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "pendingGenerationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "embeddingProfile": {
            "type": [
              "string",
              "null"
            ]
          },
          "embeddingErrorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "embeddingUpdatedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "searchable": {
            "type": "boolean"
          },
          "pipeline": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "documentId": {
                    "type": "string"
                  },
                  "generationId": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "processing",
                      "ready",
                      "retrying",
                      "failed",
                      "ready_with_warnings",
                      "skipped",
                      "cancelled"
                    ]
                  },
                  "revision": {
                    "type": "string"
                  },
                  "stages": {
                    "type": "object",
                    "properties": {
                      "prepare": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "processing",
                          "ready",
                          "retrying",
                          "failed",
                          "ready_with_warnings",
                          "skipped",
                          "cancelled"
                        ]
                      },
                      "embed": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "processing",
                          "ready",
                          "retrying",
                          "failed",
                          "ready_with_warnings",
                          "skipped",
                          "cancelled"
                        ]
                      },
                      "graph": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "processing",
                          "ready",
                          "retrying",
                          "failed",
                          "ready_with_warnings",
                          "skipped",
                          "cancelled"
                        ]
                      },
                      "summarize": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "processing",
                          "ready",
                          "retrying",
                          "failed",
                          "ready_with_warnings",
                          "skipped",
                          "cancelled"
                        ]
                      },
                      "finalize": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "processing",
                          "ready",
                          "retrying",
                          "failed",
                          "ready_with_warnings",
                          "skipped",
                          "cancelled"
                        ]
                      }
                    },
                    "required": [
                      "prepare",
                      "embed",
                      "graph",
                      "summarize",
                      "finalize"
                    ],
                    "additionalProperties": {}
                  },
                  "batches": {
                    "type": "object",
                    "properties": {
                      "total": {
                        "type": "number"
                      },
                      "completed": {
                        "type": "number"
                      },
                      "failed": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "total",
                      "completed",
                      "failed"
                    ],
                    "additionalProperties": {}
                  },
                  "warnings": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "stage": {
                          "type": "string",
                          "enum": [
                            "graph",
                            "summarize"
                          ]
                        },
                        "code": {
                          "type": "string"
                        },
                        "retryable": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "stage",
                        "code",
                        "retryable"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "updatedAt": {
                    "type": "string"
                  }
                },
                "required": [
                  "documentId",
                  "generationId",
                  "status",
                  "revision",
                  "stages",
                  "batches",
                  "warnings",
                  "updatedAt"
                ],
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "documentId",
          "embeddingStatus",
          "activeGenerationId",
          "pendingGenerationId",
          "embeddingProfile",
          "embeddingErrorCode",
          "embeddingUpdatedAt",
          "searchable",
          "pipeline"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "refresh_document_index",
      "description": "Queue an explicit asynchronous reindex for one document; use batch_documents(action=refresh_index) for multiple explicit IDs. Routine content and placement changes already schedule indexing; check get_document_index_status first.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "documentId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "documentId"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string"
          },
          "generationId": {
            "type": "string"
          },
          "deduplicated": {
            "type": "boolean"
          }
        },
        "required": [
          "documentId",
          "generationId",
          "deduplicated"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "list_trash",
      "description": "List soft-deleted documents visible to the active workspace or category scope. Requires read access and does not restore or purge anything.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "title": {
                      "type": "string"
                    },
                    "deletedAt": {
                      "type": "string"
                    },
                    "purgeAfter": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "deletedAt",
                    "purgeAfter"
                  ],
                  "additionalProperties": {}
                }
              },
              "folders": {
                "type": "array",
                "items": {}
              }
            },
            "required": [
              "documents",
              "folders"
            ],
            "additionalProperties": {}
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string"
              },
              "scopedResults": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "slug"
                      ],
                      "additionalProperties": false
                    },
                    "categoryId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "documents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "title": {
                                "type": "string"
                              },
                              "deletedAt": {
                                "type": "string"
                              },
                              "purgeAfter": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "title",
                              "deletedAt",
                              "purgeAfter"
                            ],
                            "additionalProperties": {}
                          }
                        },
                        "folders": {
                          "type": "array",
                          "items": {}
                        }
                      },
                      "required": [
                        "documents",
                        "folders"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "workspace",
                    "categoryId",
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "operation",
              "scopedResults"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    {
      "name": "restore_trashed_document",
      "description": "Return one document from trash to the active library; use batch_documents(action=restore) for multiple explicit IDs. This restores the document itself, unlike restore_document_version which changes content.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "permanently_delete_document",
      "description": "Irreversibly purge a document already in trash, including its version history. Use only on an explicit user request after checking list_trash.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID returned by the corresponding list or read operation."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "batch_documents",
      "description": "Use for multiple explicitly selected documents that need the same action; for one document prefer the matching single-document tool. Accepts 1\u201325 IDs for automation compatibility. Supports move, set_category, add_tag, remove_tag, trash, restore, or refresh_index. Processes sequentially through the existing API with a permission check per document and a per-ID result; partial success is possible. Stops after authentication or rate-limit failure. Never expands a search result or permanently purges documents; version restore is separate.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID of an item visible to the active API key."
                },
                "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
              },
              "action": {
                "type": "string",
                "const": "move",
                "description": "Move each document to the same folder."
              },
              "folderId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID of an item visible to the active API key."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Destination folder UUID, or null for no folder."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "documentIds",
              "action",
              "folderId"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "categoryId"
                      ]
                    },
                    {
                      "required": [
                        "tagId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID of an item visible to the active API key."
                },
                "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
              },
              "action": {
                "type": "string",
                "const": "set_category",
                "description": "Set one explicit category on every document."
              },
              "categoryId": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "UUID of an item visible to the active API key."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Category UUID, or null to clear explicit category."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "documentIds",
              "action",
              "categoryId"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "folderId"
                      ]
                    },
                    {
                      "required": [
                        "tagId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID of an item visible to the active API key."
                },
                "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
              },
              "action": {
                "type": "string",
                "const": "add_tag",
                "description": "Assign one existing tag to every document."
              },
              "tagId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Existing tag UUID to assign to each document."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "documentIds",
              "action",
              "tagId"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "folderId"
                      ]
                    },
                    {
                      "required": [
                        "categoryId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID of an item visible to the active API key."
                },
                "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
              },
              "action": {
                "type": "string",
                "const": "remove_tag",
                "description": "Remove one tag assignment from every document."
              },
              "tagId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Existing tag UUID to unassign from each document."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "documentIds",
              "action",
              "tagId"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "folderId"
                      ]
                    },
                    {
                      "required": [
                        "categoryId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID of an item visible to the active API key."
                },
                "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
              },
              "action": {
                "type": "string",
                "const": "trash",
                "description": "Move every document to trash without permanent deletion."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "documentIds",
              "action"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "folderId"
                      ]
                    },
                    {
                      "required": [
                        "categoryId"
                      ]
                    },
                    {
                      "required": [
                        "tagId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID of an item visible to the active API key."
                },
                "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
              },
              "action": {
                "type": "string",
                "const": "restore",
                "description": "Restore every selected document from trash."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "documentIds",
              "action"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "folderId"
                      ]
                    },
                    {
                      "required": [
                        "categoryId"
                      ]
                    },
                    {
                      "required": [
                        "tagId"
                      ]
                    }
                  ]
                }
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "documentIds": {
                "minItems": 1,
                "maxItems": 25,
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "UUID of an item visible to the active API key."
                },
                "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
              },
              "action": {
                "type": "string",
                "const": "refresh_index",
                "description": "Request explicit indexing retry for every document."
              },
              "workspaceId": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "documentIds",
              "action"
            ],
            "allOf": [
              {
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "folderId"
                      ]
                    },
                    {
                      "required": [
                        "categoryId"
                      ]
                    },
                    {
                      "required": [
                        "tagId"
                      ]
                    }
                  ]
                }
              }
            ]
          }
        ],
        "properties": {
          "documentIds": {
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
              "description": "UUID of an item visible to the active API key."
            },
            "description": "One to 25 distinct document UUIDs, explicitly selected by the user; no search expansion."
          },
          "action": {
            "anyOf": [
              {
                "type": "string",
                "const": "move",
                "description": "Move each document to the same folder."
              },
              {
                "type": "string",
                "const": "set_category",
                "description": "Set one explicit category on every document."
              },
              {
                "type": "string",
                "const": "add_tag",
                "description": "Assign one existing tag to every document."
              },
              {
                "type": "string",
                "const": "remove_tag",
                "description": "Remove one tag assignment from every document."
              },
              {
                "type": "string",
                "const": "trash",
                "description": "Move every document to trash without permanent deletion."
              },
              {
                "type": "string",
                "const": "restore",
                "description": "Restore every selected document from trash."
              },
              {
                "type": "string",
                "const": "refresh_index",
                "description": "Request explicit indexing retry for every document."
              }
            ]
          },
          "folderId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID of an item visible to the active API key."
              },
              {
                "type": "null"
              }
            ],
            "description": "Destination folder UUID, or null for no folder."
          },
          "categoryId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "UUID of an item visible to the active API key."
              },
              {
                "type": "null"
              }
            ],
            "description": "Category UUID, or null to clear explicit category."
          },
          "tagId": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Existing tag UUID to assign to each document."
              },
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Existing tag UUID to unassign from each document."
              }
            ]
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "outputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "move",
              "set_category",
              "add_tag",
              "remove_tag",
              "trash",
              "restore",
              "refresh_index"
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 1,
            "maximum": 25
          },
          "succeeded": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "aborted": {
            "type": "boolean"
          },
          "results": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "status": {
                      "type": "string",
                      "const": "ok"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "additionalProperties": {}
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "status": {
                      "type": "string",
                      "const": "error"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "code",
                        "message"
                      ],
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "id",
                    "status",
                    "error"
                  ],
                  "additionalProperties": {}
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "status": {
                      "type": "string",
                      "const": "skipped"
                    }
                  },
                  "required": [
                    "id",
                    "status"
                  ],
                  "additionalProperties": {}
                }
              ]
            }
          }
        },
        "required": [
          "action",
          "total",
          "succeeded",
          "failed",
          "aborted",
          "results"
        ],
        "additionalProperties": {}
      }
    },
    {
      "name": "get_workspace_item",
      "description": "Read one visible folder, category, or tag by UUID. Folder uses its direct API getter; category and tag lookup uses the complete permission-filtered lists. An absent or out-of-scope ID is reported as not found. Use list_workspace_structure to discover IDs first.",
      "inputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "folder",
              "category",
              "tag"
            ],
            "description": "The workspace resource type to read by ID."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "description": "UUID of an item visible to the active API key."
          },
          "workspaceId": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "additionalProperties": false
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "outputSchema": {
        "type": "object",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "folder"
              },
              "result": {
                "$ref": "#/$defs/__schema0"
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "category"
              },
              "result": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "order": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "documentCount": {
                        "type": "number"
                      },
                      "folderCount": {
                        "type": "number"
                      },
                      "apiMode": {
                        "type": "string",
                        "enum": [
                          "unavailable",
                          "global",
                          "category"
                        ]
                      },
                      "apiPermissionRead": {
                        "type": "boolean"
                      },
                      "apiPermissionEdit": {
                        "type": "boolean"
                      },
                      "apiPermissionWrite": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "order",
                      "createdAt",
                      "updatedAt",
                      "apiMode",
                      "apiPermissionRead",
                      "apiPermissionEdit",
                      "apiPermissionWrite"
                    ],
                    "additionalProperties": {}
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "order": {
                        "type": "number"
                      },
                      "createdAt": {
                        "type": "string"
                      },
                      "updatedAt": {
                        "type": "string"
                      },
                      "documentCount": {
                        "type": "number"
                      },
                      "folderCount": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "order",
                      "createdAt",
                      "updatedAt"
                    ],
                    "additionalProperties": {}
                  }
                ]
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "operation": {
                "type": "string",
                "const": "tag"
              },
              "result": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "color": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "createdAt": {
                    "type": "string"
                  },
                  "documentCount": {
                    "type": "number"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "color"
                ],
                "additionalProperties": {}
              }
            },
            "required": [
              "operation",
              "result"
            ],
            "additionalProperties": false
          }
        ],
        "$defs": {
          "__schema0": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "ownerId": {
                "type": "string"
              },
              "parentId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              },
              "categoryId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order": {
                "type": "number"
              },
              "documentCount": {
                "type": "number"
              },
              "subfolderCount": {
                "type": "number"
              },
              "children": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/__schema0"
                }
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "folderId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "folderName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "categoryId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "categoryName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "color": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "type": "string"
                          },
                          "documentCount": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "color"
                        ],
                        "additionalProperties": {}
                      }
                    }
                  },
                  "required": [
                    "id",
                    "title",
                    "content",
                    "folderId",
                    "folderName",
                    "categoryId",
                    "categoryName",
                    "createdAt",
                    "updatedAt",
                    "tags"
                  ],
                  "additionalProperties": {}
                }
              }
            },
            "required": [
              "id",
              "ownerId",
              "parentId",
              "name",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": {}
          }
        }
      }
    }
  ],
  "prompts": [
    {
      "name": "organize_workspace",
      "description": "Plan safe document organization using DocsMint categories and folders."
    },
    {
      "name": "research_workspace",
      "description": "Research a question with hybrid search and GraphRAG while citing DocsMint document IDs."
    }
  ],
  "resources": [
    {
      "name": "editor-guide",
      "description": "Editor usage guide: read before update, preserve language and structure, refresh the index when needed.",
      "uri": "docsmint://guide/editor"
    },
    {
      "name": "search-guide",
      "description": "Search and GraphRAG guide: hybrid retrieval first, graph only from authorized document IDs.",
      "uri": "docsmint://guide/search"
    },
    {
      "name": "workspace-catalog",
      "description": "Live scoped workspace catalog of categories, folders, and tags visible to the API key.",
      "uri": "docsmint://workspace/catalog"
    }
  ],
  "localizations": [
    {
      "locale": "en-US",
      "name": "DocsMint",
      "description": "Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.",
      "summary": "Search, read, create, and organize the same documents you use in DocsMint. Choose DocsMint Cloud for the simplest connection, or connect a self-hosted workspace with stdio or scoped Bearer HTTP.\n\n## DocsMint Cloud \u2014 recommended\n\n1. Open [DocsMint Cloud setup](https://docsmint.com/mcp/connect?source=lobehub_mcp).\n2. Connect to `https://docsmint.com/mcp` over Streamable HTTP; no server deployment or local process is required.\n3. OAuth clients discover hosted authorization. Follow the [DocsMint Cloud setup guide](https://docsmint.com/mcp/connect?source=lobehub_mcp) for currently supported discovery and client-connection methods. Browser consent binds access to the selected workspaces, optional categories, and requested scopes. DocsMint Cloud 1.1.9 and later supports hourly access tokens and rotating refresh tokens for up to 30 days from authorization when the client supports renewal. Existing connections need one reconnect to enable refresh; clients without refresh support reconnect after access expires.\n4. Clients using API keys can send `Authorization: Bearer <key>` with a workspace-bound or category-scoped credential created in the authenticated browser UI.\n\n## Self-hosted \u2014 advanced\n\n1. [Install DocsMint with Docker](https://github.com/HiAi-gg/docsmint#quickstart).\n2. Create an API key in your DocsMint browser UI.\n3. Set `HIAI_DOCS_URL` and `HIAI_DOCS_API_KEY` in your MCP client's environment, then run the stdio bridge:\n\n```sh\nbunx --package @hiai-gg/docsmint@2.1.1 docsmint-mcp\n```\n\nFor HTTP clients, use your self-hosted `/mcp` endpoint with the same scoped Bearer API key. Configure allowed origins and the public application URL on the host. Cloud OAuth is not installed in OSS.\n\nThe npm package connects to your existing DocsMint API with your API key; it does not install the application, database, or hosted Cloud OAuth server.\n\n[Client configuration](https://github.com/HiAi-gg/docsmint/blob/main/packages/mcp-server/README.md) \u00b7 [Docker images](https://hub.docker.com/r/vgalibov/docsmint) \u00b7 [Deployment guide](https://github.com/HiAi-gg/docsmint/blob/main/docs/DEPLOYMENT.md)\n\n## What your agent can do\n\n- Search documents with hybrid retrieval and GraphRAG.\n- Read, create, update, and organize documents within the granted scope.\n- Manage tags, folders, categories, version history, indexing, and document trash.\n- Apply bounded batch actions and inspect one visible folder, category, or tag by UUID.\n\n## Latest release: 2.1.1\n\nAdds self-hosted HTTP MCP, a protocol-derived catalog, compact responses and redacted argument diagnostics. Document filtering, pagination, previews, export metadata and credential discovery use the same scoped REST/SDK contracts. Existing tool names and result envelopes are retained. Detailed search diagnostics are opt-in.\n\n[Release notes](https://github.com/HiAi-gg/docsmint/releases/tag/v2.1.1) \u00b7 [Current README](https://github.com/HiAi-gg/docsmint#readme) \u00b7 [Full changelog](https://github.com/HiAi-gg/docsmint/blob/main/CHANGELOG.md)\n",
      "tags": [
        "knowledge-base",
        "mcp",
        "rag",
        "graphrag",
        "semantic-search",
        "wiki",
        "self-hosted",
        "documents"
      ]
    }
  ]
}