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

# Azure DevOps Wiki Tools

> Connect Genesis to Azure DevOps Wikis so agents can search, read, list, write, and inspect wiki pages, revision history, attachments, and work-item links for project and code wikis.

## **Overview**

<Note>
  Before using this tool group, save an Azure DevOps connection as described in
  [Azure DevOps](/docs/Setup/Azure-DevOps). If `connection_id` is omitted, the
  tools use the effective default `azure_devops` connection for the current
  user (My default, then Role default). Actions that need a project use the
  explicit `project` parameter first and otherwise fall back to the connection's
  saved default `project`. When multiple role defaults conflict, pass
  `connection_id` explicitly or set a user default. See
  [Default connection layers](/docs/Setup/Connections#default-connection-layers).
</Note>

### **Tool Name**

```json theme={null}
azure_devops_wiki_tools
```

### **Purpose**

The **azure\_devops\_wiki\_tools** group integrates Genesis with Azure DevOps
Wikis. Search wiki content, list wikis and pages, read page bodies with author
and timestamp enrichment, create or update pages, browse the page tree or flat
page batches, retrieve git-backed revision history, download attachments into
the thread, and inspect page metadata with backing-repository and work-item
links. Supports both project wikis and git-backed code wikis.

### **Key Features**

<Steps>
  <Step title="Discover wikis and pages" icon="folder-tree">
    List wikis in a project, browse the page hierarchy, or enumerate large wikis
    with paginated flat listings.
  </Step>

  <Step title="Search wiki content" icon="magnifying-glass">
    Run full-text search across wiki pages and read highlighted match fragments.
  </Step>

  <Step title="Read pages and history" icon="file-lines">
    Fetch page content with created/modified metadata from git history, or list
    revision commits for a page path.
  </Step>

  <Step title="Attachments and cross-links" icon="paperclip">
    Download wiki attachments into the thread and resolve work-item and
    repository links for a page.
  </Step>

  <Step title="Create and update pages" icon="pen-to-square">
    Publish new wiki pages or replace an existing page body after reading its
    current version (ETag).
  </Step>
</Steps>

## **Input Parameters for Each Function**

### **`ado_list_wikis`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_search_wiki`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`search_text`** | String | none | Required. Keywords to search for across wiki page content. |
| **`wiki`** | String | `None` | Optional wiki name or id to restrict the search to one wiki. |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`top`** | Integer | `25` | Maximum results to return (max `200`). |
| **`skip`** | Integer | `0` | Number of results to skip for paging. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_get_wiki_page`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`wiki`** | String | none | Required. Wiki name or wiki id, as returned by `ado_list_wikis`. |
| **`path`** | String | `/` | Wiki page path such as `/Home` or `/How To/Deploy`. |
| **`page_id`** | Integer | `None` | Optional numeric wiki page id as an alternative to `path`. |
| **`include_content`** | Boolean | `true` | When `false`, return only page metadata without the content body. |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_get_wiki_page_revisions`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`wiki`** | String | none | Required. Wiki name or wiki id. |
| **`path`** | String | none | Required. Wiki page path whose history to read. |
| **`from_date`** | String | `None` | Optional ISO 8601 date (for example `2026-01-01`) — only revisions on or after this date. |
| **`to_date`** | String | `None` | Optional ISO 8601 date — only revisions on or before this date. |
| **`top`** | Integer | `25` | Maximum revisions to return (max `200`). |
| **`skip`** | Integer | `0` | Number of revisions to skip, newest first. |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_get_wiki_page_tree`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`wiki`** | String | none | Required. Wiki name or wiki id. |
| **`path`** | String | `/` | Root path to list from (`/` lists the whole wiki). |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_list_wiki_pages`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`wiki`** | String | none | Required. Wiki name or wiki id. |
| **`top`** | Integer | `100` | Pages per batch (max `100`). |
| **`continuation_token`** | String | `None` | Token from the previous batch to fetch the next one. |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_download_wiki_attachment`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`wiki`** | String | none | Required. Wiki name or wiki id. |
| **`attachment`** | String | none | Required. Attachment file name (for example `diagram.png`) or full wiki repo path (for example `/.attachments/diagram.png`) as referenced from page markdown. |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_get_wiki_page_metadata`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`wiki`** | String | none | Required. Wiki name or wiki id. |
| **`path`** | String | none | Required. Wiki page path whose metadata to read. |
| **`include_work_items`** | Boolean | `true` | When `false`, skip resolving linked work items (faster). |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

### **`ado_create_or_update_wiki_page`**

| **Name** | **Type** | **Default** | **Definition** |
| - | - | - | - |
| **`wiki`** | String | none | Required. Wiki name or wiki id. |
| **`path`** | String | none | Required. Wiki page path to create or update, for example `/Runbooks/Deploy Checklist`. |
| **`content`** | String | none | Required. Full markdown content for the page (replaces the existing body on update; max 200,000 characters). |
| **`version`** | String | `None` | Page version (ETag) from `ado_get_wiki_page`. Required to update an existing page; omit to create a new one. |
| **`project`** | String | connection default project when available | Optional Azure DevOps project. |
| **`connection_id`** | String | default `azure_devops` connection | Optional saved Azure DevOps connection name. |

## **Example Usage**

```python theme={null}
# List wikis, then search and read a matching page
ado_list_wikis(project="Platform")

ado_search_wiki(
    search_text="deployment runbook",
    wiki="Platform.wiki",
    project="Platform",
    top=10,
)

ado_get_wiki_page(
    wiki="Platform.wiki",
    path="/Operations/Deployment",
    project="Platform",
)
```

```python theme={null}
# Browse structure and revision history for one page
ado_get_wiki_page_tree(
    wiki="Platform.wiki",
    path="/",
    project="Platform",
)

ado_get_wiki_page_revisions(
    wiki="Platform.wiki",
    path="/Operations/Deployment",
    from_date="2026-01-01",
    top=25,
    project="Platform",
)
```

```python theme={null}
# Paginate a large wiki and download an attachment
ado_list_wiki_pages(
    wiki="Platform.wiki",
    top=100,
    project="Platform",
)

ado_download_wiki_attachment(
    wiki="Platform.wiki",
    attachment="architecture-diagram.png",
    project="Platform",
)

ado_get_wiki_page_metadata(
    wiki="Platform.wiki",
    path="/Operations/Deployment",
    project="Platform",
)
```

```python theme={null}
# Create a new page, or update after reading the current version
ado_create_or_update_wiki_page(
    wiki="Platform.wiki",
    path="/Operations/New Runbook",
    content="# Deploy checklist\n\n1. Run smoke tests\n",
    project="Platform",
)

page = ado_get_wiki_page(
    wiki="Platform.wiki",
    path="/Operations/Deployment",
    project="Platform",
)

ado_create_or_update_wiki_page(
    wiki="Platform.wiki",
    path="/Operations/Deployment",
    content="# Deployment\n\nUpdated steps...\n",
    version=page["version"],
    project="Platform",
)
```

## **Output**

* **`ado_list_wikis`** returns `wikis` (id, name, type — `projectWiki` or
  `codeWiki` — `repositoryId`, `mappedPath`) and `count`.
* **`ado_search_wiki`** returns `count` and `results` with `path`, `wiki`,
  `project`, `file_name`, `content_id`, and `hits` (highlighted fragments).
* **`ado_get_wiki_page`** returns `page` (markdown/HTML content preserved as
  stored), `wiki`, `version` (page ETag), `created_by` / `created_date` and
  `last_modified_by` / `last_modified_date` from git history,
  `content_size_bytes`, and `content_omitted`. Pages larger than 5 MB omit
  inline `content` and return `download_url` and `web_url` instead. A
  `history_error` may appear when git history enrichment fails without failing
  the read.
* **`ado_get_wiki_page_revisions`** returns `revisions` (newest first:
  `commit_id`, `author`, `committer`, `message`, `url`), `count`,
  `page_path`, and `git_item_path`.
* **`ado_get_wiki_page_tree`** returns `tree` (nested nodes with `path`,
  `is_parent_page`, `sub_pages`, and `git_item_path` / `id` when present) and
  `page_count`. No page content is included.
* **`ado_list_wiki_pages`** returns `pages` (id and path per page), `count`, and
  `continuation_token` for the next batch (`null` when exhausted).
* **`ado_download_wiki_attachment`** saves the file to the thread and returns
  `file_path`, `relative_path`, `file_id`, `file_name`, `size`, and
  `attachment_path`.
* **`ado_get_wiki_page_metadata`** returns `page` (metadata only), `version`,
  `wiki`, `repository` (backing git repo), `work_items` (linked ids and URLs),
  and `links` (`WorkItem` / `Repository` entries). `work_items_error` or
  `repository_error` may appear when that lookup fails while the rest succeeds.
* **`ado_create_or_update_wiki_page`** returns `success`, `created` (`true` when
  a new page was created, `false` when an existing page was updated), `page`,
  `version` (the new ETag — pass it to the next update), and `web_url`. On
  failure, `success` is `false` with `error`; HTTP failures may also include
  `status_code` (`412` means the supplied version was stale or missing — re-read
  the page and retry; `401` or `403` usually means the PAT lacks **Wiki (Read &
  Write)** or the caller lacks contribute permission on the wiki project).

## **Configuration Details**

* Wiki reads need **Wiki (Read)** and **Code (Read)** PAT scopes. Page writes
  additionally need **Wiki (Read & Write)**. Deleting pages and uploading
  attachments are not supported.
* Calls that resolve a project require either an explicit `project` parameter
  or a default `project` on the saved connection.
* See [Azure DevOps](/docs/Setup/Azure-DevOps) for the full PAT scope list.
* Azure DevOps Services wiki full-text search is served from
  `almsearch.dev.azure.com`, so outbound allowlists must include that host.

## **Limitations or Notes**

1. Use `ado_list_wikis` first when the wiki name is unknown — every other tool
   takes `wiki` as name or id from that listing.
2. `ado_get_wiki_page_tree` is best for wikis with roughly up to 1,000 pages.
   For larger wikis, prefer `ado_list_wiki_pages` and page in with
   `continuation_token`.
3. Wiki search can lag recent edits. If `ado_search_wiki` returns no matches,
   browse with `ado_get_wiki_page_tree` or list pages with
   `ado_list_wiki_pages`.
4. `ado_download_wiki_attachment` only fetches files under the wiki's
   `.attachments` folder (up to 100 MB per file). Pass the name from page
   markdown or the full `/.attachments/...` path.
5. `ado_get_wiki_page` accepts either `path` or `page_id`. A 404 means the path
   does not exist in that wiki — confirm the path with
   `ado_get_wiki_page_tree`.
6. To update a page with `ado_create_or_update_wiki_page`, read it first with
   `ado_get_wiki_page` and pass the returned `version`. Omit `version` only when
   creating a new page. `content` replaces the entire page body; it is not
   appended.
7. Page deletion and attachment upload are not supported in this tool group.
8. For Confluence documentation use the Confluence connector; for Genesis's
   internal wiki use the wiki knowledge tools.

## **Related Pages**

* [Azure DevOps](/docs/Setup/Azure-DevOps)
* [Azure DevOps Boards Tools](/docs/Genbot-Toolkit/Azure-DevOps-Boards-Tools)
* [Azure DevOps Pipelines Tools](/docs/Genbot-Toolkit/Azure-DevOps-Pipelines-Tools)
* [Git Action Tools](/docs/Genbot-Toolkit/Git-Action-Tools)
