Tool consolidation for wiki tools#1423
Merged
Merged
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
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
wikitool that dispatches byaction, with centralized validation and per-action error messaging. - Renamed the create/update page tool to
wiki_upsert_pageand 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
| "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 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 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 | ✅ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
actionparameter, updates documentation for clarity, and improves error handling and parameter validation.Wiki tool consolidation and refactoring:
wikitool that uses anactionparameter 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:
docs/TOOLSET.mdto reflect the new tool grouping, parameter structure, and to note alignment with the Azure DevOps remote MCP server. The documentation now describes the newaction-based dispatcher and clarifies which parameters are required for each operation. [1] [2]Error handling improvements:
Parameter validation and flexibility:
urlfor page content retrieval. [1] [2] [3]Write operation tool renaming:
wiki_upsert_pagefor 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
🧪 How did you test it?
manually testing all of the wiki tools and made sure automated tests are updated