Skip to content

Tool consolidation for wiki tools#1423

Merged
danhellem merged 2 commits into
mainfrom
users/danhellem/wiki-consolidate-1
Jul 15, 2026
Merged

Tool consolidation for wiki tools#1423
danhellem merged 2 commits into
mainfrom
users/danhellem/wiki-consolidate-1

Conversation

@danhellem

Copy link
Copy Markdown
Collaborator

This pull request refactors and consolidates the Azure DevOps wiki toolset to align with the remote MCP server's structure. It replaces multiple specialized wiki tools with a single dispatcher tool using an action parameter, updates documentation for clarity, and improves error handling and parameter validation.

Wiki tool consolidation and refactoring:

  • Consolidated all read-only wiki operations into a single wiki tool that uses an action parameter to select between listing wikis, getting wiki details, listing pages, getting page metadata, and retrieving page content. The previous individual tools (e.g., mcp_ado_wiki_list_wikis, mcp_ado_wiki_get_wiki, etc.) are removed. (src/tools/wiki.ts, docs/TOOLSET.md) [1] [2] [3] [4] [5] [6] [7] [8]

Documentation updates:

  • Updated the docs/TOOLSET.md to reflect the new tool grouping, parameter structure, and to note alignment with the Azure DevOps remote MCP server. The documentation now describes the new action-based dispatcher and clarifies which parameters are required for each operation. [1] [2]

Error handling improvements:

  • Centralized and clarified error messages for each wiki action, ensuring consistent and informative feedback for failed operations.

Parameter validation and flexibility:

  • Improved validation for required parameters based on the chosen action, and added support for optional parameters such as url for page content retrieval. [1] [2] [3]

Write operation tool renaming:

  • Renamed the create/update wiki page tool to wiki_upsert_page for consistency with the new naming scheme. [1] [2]

These changes simplify the codebase, make the API more intuitive, and ensure the toolset is consistent with Azure DevOps standards.

GitHub issue number

N/A

Associated Risks

Changing the signature of tools in wiki

PR Checklist

  • I have read the contribution guidelines
  • I have read the code of conduct guidelines
  • Title of the pull request is clear and informative.
  • 👌 Code hygiene
  • 🔭 Telemetry added, updated, or N/A
  • 📄 Documentation added, updated, or N/A
  • 🛡️ Automated tests added, or N/A

🧪 How did you test it?

manually testing all of the wiki tools and made sure automated tests are updated

@danhellem danhellem requested a review from a team as a code owner July 14, 2026 18:22
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@danhellem danhellem changed the title Refactor code structure for readability and maintainability Tool consolidation for wiki tools Jul 14, 2026
@skmanoj skmanoj requested a review from Copilot July 15, 2026 13:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates the Azure DevOps wiki read operations into a single wiki dispatcher tool (selected via an action parameter), and renames the write tool to wiki_upsert_page, aligning the local toolset shape with the remote MCP server’s wiki tool structure.

Changes:

  • Replaced multiple read-only wiki tools with a single wiki tool that dispatches by action, with centralized validation and per-action error messaging.
  • Renamed the create/update page tool to wiki_upsert_page and simplified its create-vs-update flow.
  • Updated unit tests and toolset documentation to reflect the new consolidated tool interface.
Show a summary per file
File Description
src/tools/wiki.ts Implements the wiki action dispatcher and renames the upsert tool; adds centralized validation + error handling.
test/src/tools/wiki.test.ts Updates tool registration expectations and adds validation/error-path coverage for the new action-based interface.
docs/TOOLSET.md Updates the tool listing to document the consolidated wiki tool structure and the renamed upsert tool.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment thread src/tools/wiki.ts
"The action to perform. Options: list_wikis (list all wikis in an organization or project), get_wiki (get details of a specific wiki), list_pages (list pages in a wiki), get_page (get wiki page metadata without content), get_page_content (retrieve wiki page content)."
),
wikiIdentifier: z.string().optional().describe("The unique identifier of the wiki. Required for get_wiki, list_pages, get_page, and get_page_content (unless url is provided)."),
project: z.string().optional().describe("The project name or ID. Required for list_pages and get_page. Optional for list_wikis, get_wiki, and get_page_content."),
Comment thread src/tools/wiki.ts
Comment on lines +32 to +34
.describe(
"The full URL of the wiki page. Used for get_page_content. If provided, wikiIdentifier, project, and path are ignored. Supported patterns: https://dev.azure.com/{org}/{project}/_wiki/wikis/{wikiIdentifier}?pagePath=%2FMy%20Page and https://dev.azure.com/{org}/{project}/_wiki/wikis/{wikiIdentifier}/{pageId}/Page-Title"
),
Comment thread docs/TOOLSET.md
Comment on lines +543 to +547
The wiki tools are consolidated into grouped dispatchers using an `action` parameter.

- **Required**: `wikiIdentifier`, `path`, `content`
- **Optional**: `branch`, `etag`, `project`
| Tool | Action | Description | Read-only |
| ------------------ | ------------------ | -------------------------------------------- | :-------: |
| `wiki` | `list_wikis` | List all wikis in an organization or project | ✅ |

@skmanoj skmanoj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@danhellem danhellem merged commit 7675bb7 into main Jul 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants