Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

wiki_list_pages

Retrieve a list of wiki pages for a specific project and wiki in Azure DevOps. Supports pagination, customizable page limits, and optional page view statistics.

Instructions

Retrieve a list of wiki pages for a specific wiki and project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
continuationTokenNoToken for pagination to retrieve the next set of pages.
pageViewsForDaysNoNumber of days to retrieve page views for. If not specified, page views are not included.
projectYesThe project name or ID where the wiki is located.
topNoThe maximum number of pages to return. Defaults to 20.
wikiIdentifierYesThe unique identifier of the wiki.

Implementation Reference

  • The core handler function that implements the wiki_list_pages tool logic by fetching a batch of wiki pages from the Azure DevOps Wiki API using getPagesBatch.
    async ({ wikiIdentifier, project, top = 20, continuationToken, pageViewsForDays }) => { try { const connection = await connectionProvider(); const wikiApi = await connection.getWikiApi(); const pagesBatchRequest: WikiPagesBatchRequest = { top, continuationToken, pageViewsForDays, }; const pages = await wikiApi.getPagesBatch(pagesBatchRequest, project, wikiIdentifier); if (!pages) { return { content: [{ type: "text", text: "No wiki pages found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(pages, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching wiki pages: ${errorMessage}` }], isError: true, }; }
  • Zod input schema defining parameters for the wiki_list_pages tool: wikiIdentifier (required), project (required), top, continuationToken, pageViewsForDays.
    { wikiIdentifier: z.string().describe("The unique identifier of the wiki."), project: z.string().describe("The project name or ID where the wiki is located."), top: z.number().default(20).describe("The maximum number of pages to return. Defaults to 20."), continuationToken: z.string().optional().describe("Token for pagination to retrieve the next set of pages."), pageViewsForDays: z.number().optional().describe("Number of days to retrieve page views for. If not specified, page views are not included."), },
  • Direct registration of the wiki_list_pages tool on the MCP server using server.tool(), referencing the name from WIKI_TOOLS.
    server.tool( WIKI_TOOLS.list_wiki_pages, "Retrieve a list of wiki pages for a specific wiki and project.", { wikiIdentifier: z.string().describe("The unique identifier of the wiki."), project: z.string().describe("The project name or ID where the wiki is located."), top: z.number().default(20).describe("The maximum number of pages to return. Defaults to 20."), continuationToken: z.string().optional().describe("Token for pagination to retrieve the next set of pages."), pageViewsForDays: z.number().optional().describe("Number of days to retrieve page views for. If not specified, page views are not included."), }, async ({ wikiIdentifier, project, top = 20, continuationToken, pageViewsForDays }) => { try { const connection = await connectionProvider(); const wikiApi = await connection.getWikiApi(); const pagesBatchRequest: WikiPagesBatchRequest = { top, continuationToken, pageViewsForDays, }; const pages = await wikiApi.getPagesBatch(pagesBatchRequest, project, wikiIdentifier); if (!pages) { return { content: [{ type: "text", text: "No wiki pages found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(pages, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching wiki pages: ${errorMessage}` }], isError: true, }; } } );
  • Constant mapping internal name to tool identifier string 'wiki_list_pages'.
    list_wiki_pages: "wiki_list_pages",
  • src/tools.ts:26-26 (registration)
    Top-level call to configureWikiTools function, which registers the wiki_list_pages tool (and other wiki tools).
    configureWikiTools(server, tokenProvider, connectionProvider);

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ennuiii/DevOpsMcpPAT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server