> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tiro.ooo/llms.txt
> Use this file to discover all available pages before exploring further.

# Wiki

> Search and traverse the auto-generated workspace wiki (read-only)

## Overview

The wiki tools expose Tiro's auto-generated workspace wiki — the entities, concepts, and relationships extracted from your meeting notes — as an agent-traversable knowledge graph. Four **read-only** tools form a search → read → traverse chain:

* **`search_wiki`** — Keyword search over wiki pages. The entry point: returns ranked pages (`pageGuid`, `name`, `pageType`, relevance) that you pass to the other three tools.
* **`get_wiki_page`** — A single page's body (description + generation state) plus metadata and its structured mentions, aliases, and links.
* **`list_wiki_mentions`** — The note paragraphs that reference a page (where, across your notes, the page is mentioned).
* **`get_wiki_graph`** — A node+edge slice of the knowledge graph, for traversing how pages connect.

The wiki's distinctive value over note search is the **graph**: you can move from an entity to where it's mentioned (`list_wiki_mentions`) to its linked concepts (`get_wiki_graph`), not just read text.

A fifth helper, **`list_workspaces`**, is not part of the chain itself — it lets a multi-workspace account discover which workspace to target (each workspace's `guid` and whether wiki is enabled), so you can pass an explicit `workspaceGuid` to the four tools above.

<Note>
  **Read-only (v1).** These tools only read the wiki. Creating, renaming, merging, or deleting wiki pages is not exposed via MCP in v1 (pending OAuth write-consent). Don't use these for note content — use `search_notes` / `get_note` instead.
</Note>

## Access & the plan gate

Wiki is a **paid, opt-in** feature. The four tools are always listed in `tools/list` (every connection sees them), but eligibility is enforced by the backend **at call time** — so a tool that appears available may still return a gate response.

A workspace can use wiki only when **both** hold:

1. **Eligible plan** — the workspace's subscription is Pro, Max, Team, or Enterprise. Free and Lite are not eligible.
2. **Activated** — a workspace admin has turned wiki on for the workspace.

When a call is gated, the tool returns an error envelope (HTTP `402`) with a machine-readable `error_code`:

| `error_code`         | Meaning                                                              | What the caller should do                                                                                                                                 |
| -------------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `WIKI_PLAN_REQUIRED` | The plan does not include wiki (Free/Lite/no subscription/inactive). | Upgrade. `action_url` points to the pricing (B2C) or team billing (team admin) page; for a team member it is `null` and the message says to ask an admin. |
| `WIKI_NOT_ACTIVATED` | The plan is eligible but wiki has not been activated by an admin.    | Activate wiki in workspace settings (admin), or ask an admin (member). No upsell — `required_plans` is `null`.                                            |

Envelope shape (relayed verbatim from the backend):

```json theme={"system"}
{
  "success": false,
  "error_code": "WIKI_PLAN_REQUIRED",
  "message": "위키 기능은 Pro 이상 요금제에서 사용할 수 있어요. 웹에서 로그인 후 요금제를 업그레이드해 주세요.",
  "current_plan": "Lite",
  "required_plans": ["pro", "max", "team", "enterprise"],
  "action_url": "https://tiro.ooo/#pricing",
  "status_code": 402
}
```

* `current_plan` — the workspace's current plan display name, or `null` when there is no subscription.
* `required_plans` — upgrade targets for `WIKI_PLAN_REQUIRED`; `null` for `WIKI_NOT_ACTIVATED`. (Team Free Trial is intentionally excluded — it is an already-held trial, not an upgrade target.)
* `action_url` — a web link to act on, or `null` when the caller cannot act themselves (team member, or activation by an admin).

<Note>
  **Workspace selection.** By default the wiki tools resolve the workspace implicitly from your API key — a workspace-bound or team key resolves directly; a personal or OAuth token resolves to your **default** workspace — the same way the note tools scope.

  If your account belongs to **multiple workspaces**, call [`list_workspaces`](#list_workspaces) to enumerate them (each with its `guid` and whether wiki is enabled), then pass the chosen `workspaceGuid` to any wiki tool to target that workspace explicitly. Omitting `workspaceGuid` keeps the default-workspace behavior. The backend verifies you are a member of the workspace you pass.
</Note>

## `list_workspaces`

List the workspaces your API key can access, each with its `guid`, `name`, and whether wiki is enabled. Use it to pick a `workspaceGuid` for the wiki tools when your account belongs to more than one workspace.

This tool takes no parameters. It returns:

```json theme={"system"}
{
  "workspaces": [
    { "guid": "ws_abc", "name": "Acme", "isWikiEnabled": true },
    { "guid": "ws_def", "name": "Personal", "isWikiEnabled": false }
  ]
}
```

* A personal/OAuth token lists every workspace you are a member of; a workspace-bound or team key lists just that one.
* `isWikiEnabled` reflects whether wiki is both plan-eligible **and** activated for that workspace — pick a workspace where it is `true`, then pass its `guid` as `workspaceGuid`.

## `search_wiki`

Search the wiki for pages by keyword. Use this first; pass the returned `pageGuid` to the other tools.

| Parameter       | Type   | Required     | Description                                                                               |
| --------------- | ------ | ------------ | ----------------------------------------------------------------------------------------- |
| `keyword`       | string | **Required** | Search term matched against page names.                                                   |
| `workspaceGuid` | string | Optional     | Target a specific workspace (from `list_workspaces`); omit to use your default workspace. |

Returns ranked page results, each with `pageGuid`, `name`, `pageType` (e.g. `CONCEPT`, `ENTITY`), and a relevance score.

## `get_wiki_page`

Get one wiki page by its `pageGuid` (from `search_wiki`).

| Parameter       | Type   | Required     | Description                                                                               |
| --------------- | ------ | ------------ | ----------------------------------------------------------------------------------------- |
| `pageGuid`      | string | **Required** | The page identifier returned by `search_wiki`.                                            |
| `workspaceGuid` | string | Optional     | Target a specific workspace (from `list_workspaces`); omit to use your default workspace. |

Returns the page **body** (description + generation state) and **metadata** (title, type, mention/alias/link counts, timestamps) plus the page's structured `mentions`, `aliases`, and `links`. Follow up with `list_wiki_mentions` to see where the page is referenced across notes.

## `list_wiki_mentions`

List the note paragraphs that mention a wiki page.

| Parameter       | Type   | Required     | Description                                                                               |
| --------------- | ------ | ------------ | ----------------------------------------------------------------------------------------- |
| `pageGuid`      | string | **Required** | The page identifier (from `search_wiki` / `get_wiki_page`).                               |
| `cursor`        | string | Optional     | Pagination cursor from a previous response.                                               |
| `workspaceGuid` | string | Optional     | Target a specific workspace (from `list_workspaces`); omit to use your default workspace. |

Returns mention records (source note, paragraph, extracted text, kind) plus a pagination cursor.

## `get_wiki_graph`

Get a node+edge slice of the wiki knowledge graph. Returns `{ nodes, edges }`, where each edge carries a typed relationship between two pages.

| Parameter              | Type      | Required     | Description                                                                                                                                                    |
| ---------------------- | --------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mode`                 | string    | **Required** | One of `seed`, `expand`, `around`, `links` (see below).                                                                                                        |
| `pageGuid`             | string    | Conditional  | Focus page for `expand` / `around`.                                                                                                                            |
| `pageGuids`            | string\[] | Conditional  | Explicit page set for `links`.                                                                                                                                 |
| `depth`                | number    | Optional     | Traversal depth for `expand`.                                                                                                                                  |
| `radius`               | number    | Optional     | Neighborhood radius for `around`.                                                                                                                              |
| `limit`                | number    | Optional     | Max nodes returned. Default `50`, max `200`.                                                                                                                   |
| `q` / `type` / `since` | —         | Optional     | Overview filters for `seed`.                                                                                                                                   |
| `folderId`             | number    | Optional     | `seed` only: restrict the graph to pages mentioned by notes in this folder (recursive over subfolders). An empty or inaccessible folder yields an empty graph. |
| `workspaceGuid`        | string    | Optional     | Target a specific workspace (from `list_workspaces`); omit to use your default workspace.                                                                      |

| `mode`   | Returns                                                                                           |
| -------- | ------------------------------------------------------------------------------------------------- |
| `seed`   | An overview graph for the workspace (optionally filtered by `q` / `type` / `since` / `folderId`). |
| `expand` | Traversal outward from `pageGuid` by `depth`.                                                     |
| `around` | A page's neighborhood by `radius`.                                                                |
| `links`  | The links among an explicit set of `pageGuids`.                                                   |

<Note>
  **Result cap.** `get_wiki_graph` returns at most `limit` nodes (default `50`, max `200`) and only the edges **between** those returned nodes (dangling edges are dropped, so every edge's endpoints are present in `nodes`). When the underlying graph was larger than the cap, the response sets `truncated: true` — narrow with `mode` / `q` / `type` or a smaller `radius` / `depth` to get a focused slice. This keeps a hub page's neighborhood from returning an unbounded payload.
</Note>

<Note>
  **Cluster-based exploration is not yet exposed.** The web app's newer graph-exploration views (overview/context/cluster) are internal-only; the MCP `get_wiki_graph` tool exposes the `seed` / `expand` / `around` / `links` modes. Exposing cluster exploration externally is on the roadmap.
</Note>

## Recommended chains

* **Pick a workspace first (multiple workspaces):** `list_workspaces` → pass the chosen `workspaceGuid` to any tool below.
* **Find what the wiki knows about a topic:** `search_wiki` → `get_wiki_page`.
* **Find where a page is grounded in your notes:** `search_wiki` → `list_wiki_mentions`.
* **Explore how concepts connect:** `search_wiki` → `get_wiki_graph` (`mode: "around"`, `pageGuid`).
