Summary
Implement a new tool, wiki_get_page, that retrieves the metadata for a specific wiki page, including its id, by using its file path.
Justification
Currently, the search_wiki tool is excellent for finding pages, but its results include the path and not the id of the wiki page.
The page id is the only way to create a stable, permanent URL to a wiki page (.../wikis/{wikiName}/{id}/{pageName}). The alternative method of linking with ?pagePath= is unreliable, as links break whenever a page is renamed or moved.
This new tool would bridge a critical gap: a user could find a page with search_wiki, take its path from the result, and use wiki_get_page to retrieve the id needed to build a stable permalink.
Tools
Develop the following tool with full parameter support, including optional ones:
wiki_get_page: Retrieve a wiki page by its path to get its metadata.
Endpoint: GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path={path}&api-version=7.1-preview.1
Parameters:
path (required): The path of the page.
recursionLevel (optional): Recursion level for subpages.
versionDescriptor (optional): The wiki version (branch name).
includeContent (optional): Set to true to include the page's content.
Rules
Adhere strictly to existing project standards and coding conventions.
Ensure the tool exposes all API parameters (required and optional).
Use the official Azure DevOps Node API to interact with the APIs.
Special treat
If you follow the rules, you'll get candy!
Summary
Implement a new tool, wiki_get_page, that retrieves the metadata for a specific wiki page, including its id, by using its file path.
Justification
Currently, the search_wiki tool is excellent for finding pages, but its results include the path and not the id of the wiki page.
The page id is the only way to create a stable, permanent URL to a wiki page (.../wikis/{wikiName}/{id}/{pageName}). The alternative method of linking with ?pagePath= is unreliable, as links break whenever a page is renamed or moved.
This new tool would bridge a critical gap: a user could find a page with search_wiki, take its path from the result, and use wiki_get_page to retrieve the id needed to build a stable permalink.
Tools
Develop the following tool with full parameter support, including optional ones:
wiki_get_page: Retrieve a wiki page by its path to get its metadata.
Endpoint: GET https://dev.azure.com/{organization}/{project}/_apis/wiki/wikis/{wikiIdentifier}/pages?path={path}&api-version=7.1-preview.1
Parameters:
path (required): The path of the page.
recursionLevel (optional): Recursion level for subpages.
versionDescriptor (optional): The wiki version (branch name).
includeContent (optional): Set to true to include the page's content.
Rules
Adhere strictly to existing project standards and coding conventions.
Ensure the tool exposes all API parameters (required and optional).
Use the official Azure DevOps Node API to interact with the APIs.
Special treat
If you follow the rules, you'll get candy!