Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

list_wiki_pages

Retrieve a list of wiki pages from an Azure DevOps wiki to view available documentation content and structure.

Instructions

List pages within an Azure DevOps wiki

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdNoThe ID or name of the organization (Default: mycompany)
projectIdNoThe ID or name of the project (Default: MyProject)
wikiIdYesThe ID or name of the wiki

Implementation Reference

  • The core handler function implementing the list_wiki_pages tool logic. It retrieves wiki pages from Azure DevOps using the wiki client.
    export async function listWikiPages(
      options: ListWikiPagesOptions,
    ): Promise<WikiPageSummary[]> {
      const { organizationId, projectId, wikiId } = options;
    
      // Use defaults if not provided
      const orgId = organizationId || defaultOrg;
      const projId = projectId || defaultProject;
    
      try {
        // Create the client
        const client = await azureDevOpsClient.getWikiClient({
          organizationId: orgId,
        });
    
        // Get the wiki pages
        const pages = await client.listWikiPages(projId, wikiId);
    
        // Return the pages directly since the client interface now matches our requirements
        return pages.map((page) => ({
          id: page.id,
          path: page.path,
          url: page.url,
          order: page.order,
        }));
      } catch (error) {
        // If it's already an AzureDevOpsError, rethrow it
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
        // Otherwise wrap it in an AzureDevOpsError
        throw new AzureDevOpsError('Failed to list wiki pages', { cause: error });
      }
    }
  • Zod schema for input validation of the list_wiki_pages tool parameters.
    export const ListWikiPagesSchema = z.object({
      organizationId: z
        .string()
        .optional()
        .nullable()
        .describe(`The ID or name of the organization (Default: ${defaultOrg})`),
      projectId: z
        .string()
        .optional()
        .nullable()
        .describe(`The ID or name of the project (Default: ${defaultProject})`),
      wikiId: z.string().describe('The ID or name of the wiki'),
    });
  • Tool definition object registering the list_wiki_pages tool with name, description, and schema.
    {
      name: 'list_wiki_pages',
      description: 'List pages within an Azure DevOps wiki',
      inputSchema: zodToJsonSchema(ListWikiPagesSchema),
    },
  • Switch case in the wikis request handler that dispatches to the listWikiPages function.
    case 'list_wiki_pages': {
      const args = ListWikiPagesSchema.parse(request.params.arguments);
      const result = await listWikiPages({
        organizationId: args.organizationId ?? defaultOrg,
        projectId: args.projectId ?? defaultProject,
        wikiId: args.wikiId,
      });
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Interface and function signature for the wiki pages handler.
    export interface WikiPageSummary {
      id: number;
      path: string;
      url?: string;
      order?: number;
    }
    
    /**
     * List wiki pages from a wiki
     *
     * @param options Options for listing wiki pages
     * @returns Array of wiki page summaries
     * @throws {AzureDevOpsResourceNotFoundError} When the wiki is not found
     * @throws {AzureDevOpsPermissionError} When the user does not have permission to access the wiki
     * @throws {AzureDevOpsError} When an error occurs while fetching the wiki pages
     */
    export async function listWikiPages(
      options: ListWikiPagesOptions,
    ): Promise<WikiPageSummary[]> {
      const { organizationId, projectId, wikiId } = options;
    
      // Use defaults if not provided
      const orgId = organizationId || defaultOrg;
      const projId = projectId || defaultProject;
    
      try {
        // Create the client
        const client = await azureDevOpsClient.getWikiClient({
          organizationId: orgId,
        });
    
        // Get the wiki pages
        const pages = await client.listWikiPages(projId, wikiId);
    
        // Return the pages directly since the client interface now matches our requirements
        return pages.map((page) => ({
          id: page.id,
          path: page.path,
          url: page.url,
          order: page.order,
        }));
      } catch (error) {
        // If it's already an AzureDevOpsError, rethrow it
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
        // Otherwise wrap it in an AzureDevOpsError
        throw new AzureDevOpsError('Failed to list wiki pages', { cause: error });
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic operation. It doesn't mention whether this is a read-only operation, what permissions are required, whether results are paginated, what format the list returns, or any rate limits. For a list operation with zero annotation coverage, this leaves significant behavioral gaps.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized for a straightforward list operation and front-loads the essential information.

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

Completeness2/5

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

For a list operation with no annotations and no output schema, the description is insufficient. It doesn't explain what the output looks like (list format, fields included), whether there are limitations (max results, pagination), or what happens when parameters are omitted. The context signals show this is a 3-parameter tool with one required parameter, but the description doesn't help the agent understand how to use these effectively.

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?

The schema description coverage is 100%, so all parameters are documented in the schema itself. The description doesn't add any parameter semantics beyond what's already in the schema descriptions. This meets the baseline expectation when schema coverage is complete.

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 action ('List') and target resource ('pages within an Azure DevOps wiki'), providing specific verb+resource pairing. However, it doesn't distinguish this tool from its sibling 'search_wiki', which appears to serve a related but different purpose.

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 like 'search_wiki' or 'get_wiki_page'. There's no mention of prerequisites, context for usage, or comparison with sibling tools that might handle similar wiki operations.

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

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/Tiberriver256/mcp-server-azure-devops'

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