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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it 'retrieves a list,' implying a read-only operation, but doesn't disclose pagination behavior (implied by the 'continuationToken' parameter in schema), rate limits, authentication needs, or what happens if the wiki/project doesn't exist. For a tool with 5 parameters and no annotation coverage, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. There's zero waste—every word contributes to understanding the tool's function. It's appropriately sized for a list operation without overcomplicating.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (5 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks behavioral details, usage context, and output information. With no output schema, the description should ideally hint at return format (e.g., 'returns a paginated list of page metadata'), but it doesn't, leaving gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no parameter-specific information beyond implying that 'wiki' and 'project' are required (matching the schema's required fields). Since the schema does the heavy lifting, the baseline score of 3 is appropriate—the description doesn't add value but doesn't detract either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Retrieve') and resource ('list of wiki pages') with specific context ('for a specific wiki and project'). It distinguishes from obvious siblings like 'wiki_get_page_content' or 'wiki_get_wiki' by focusing on listing pages rather than fetching content or wiki metadata. However, it doesn't explicitly differentiate from 'wiki_list_wikis' (which lists wikis rather than pages) or 'search_wiki' (which might search within pages), so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention siblings like 'search_wiki' for filtered searches or 'wiki_get_page_content' for individual page details. There's no context about prerequisites, typical use cases, or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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