Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

wiki_get_page_content

Retrieve content from Azure DevOps wiki pages using unique identifiers and paths. Access specific project wikis and manage content efficiently with PAT authentication.

Instructions

Retrieve wiki page content by wikiIdentifier and path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path of the wiki page to retrieve content for.
projectYesThe project name or ID where the wiki is located.
wikiIdentifierYesThe unique identifier of the wiki.

Implementation Reference

  • The core handler function that implements the wiki_get_page_content tool logic: connects to Azure DevOps, fetches the wiki page text as a stream using WikiApi.getPageText, converts it to string, and returns as JSON.
    async ({ wikiIdentifier, project, path }) => {
      try {
        const connection = await connectionProvider();
        const wikiApi = await connection.getWikiApi();
    
        const stream = await wikiApi.getPageText(project, wikiIdentifier, path, undefined, undefined, true);
    
        if (!stream) {
          return { content: [{ type: "text", text: "No wiki page content found" }], isError: true };
        }
    
        const content = await streamToString(stream);
    
        return {
          content: [{ type: "text", text: JSON.stringify(content, null, 2) }],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
    
        return {
          content: [{ type: "text", text: `Error fetching wiki page content: ${errorMessage}` }],
          isError: true,
        };
      }
    }
  • Input schema validation using Zod for the tool parameters: wikiIdentifier, project, and path.
      wikiIdentifier: z.string().describe("The unique identifier of the wiki."),
      project: z.string().describe("The project name or ID where the wiki is located."),
      path: z.string().describe("The path of the wiki page to retrieve content for."),
    },
  • Direct registration of the wiki_get_page_content tool on the McpServer using server.tool, including description, schema, and handler.
    server.tool(
      WIKI_TOOLS.get_wiki_page_content,
      "Retrieve wiki page content by wikiIdentifier and path.",
      {
        wikiIdentifier: z.string().describe("The unique identifier of the wiki."),
        project: z.string().describe("The project name or ID where the wiki is located."),
        path: z.string().describe("The path of the wiki page to retrieve content for."),
      },
      async ({ wikiIdentifier, project, path }) => {
        try {
          const connection = await connectionProvider();
          const wikiApi = await connection.getWikiApi();
    
          const stream = await wikiApi.getPageText(project, wikiIdentifier, path, undefined, undefined, true);
    
          if (!stream) {
            return { content: [{ type: "text", text: "No wiki page content found" }], isError: true };
          }
    
          const content = await streamToString(stream);
    
          return {
            content: [{ type: "text", text: JSON.stringify(content, null, 2) }],
          };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
    
          return {
            content: [{ type: "text", text: `Error fetching wiki page content: ${errorMessage}` }],
            isError: true,
          };
        }
      }
    );
  • src/tools.ts:26-26 (registration)
    High-level registration call to configureWikiTools, which sets up all wiki tools including wiki_get_page_content.
    configureWikiTools(server, tokenProvider, connectionProvider);
  • Helper function to convert the wiki page content stream to a string, used in the handler.
    function streamToString(stream: NodeJS.ReadableStream): Promise<string> {
      return new Promise((resolve, reject) => {
        let data = "";
        stream.setEncoding("utf8");
        stream.on("data", (chunk) => (data += chunk));
        stream.on("end", () => resolve(data));
        stream.on("error", reject);
      });
    }
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 the tool retrieves content but doesn't disclose behavioral traits such as whether it's read-only (implied by 'retrieve'), authentication requirements, rate limits, error conditions, or the format of returned content. For a tool with no annotations, this is a significant gap in transparency.

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 and required parameters. It's front-loaded with no wasted words, making it easy to parse quickly. Every part of the sentence earns its place.

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?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'content' includes (e.g., text, metadata, formatting), potential errors, or return format. For a retrieval tool with three required parameters, more context is needed to guide the agent 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?

Schema description coverage is 100%, with clear descriptions for each parameter (wikiIdentifier, project, path). The description adds minimal value beyond the schema, only reiterating the parameters without providing additional context like examples or constraints. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('Retrieve') and resource ('wiki page content'), specifying it's for a particular wiki page identified by wikiIdentifier and path. It distinguishes from siblings like wiki_list_pages (which lists pages) and wiki_get_wiki (which gets wiki metadata), though it doesn't explicitly name these alternatives. The purpose is specific but could be more differentiated from similar tools.

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?

No guidance is provided on when to use this tool versus alternatives like wiki_list_pages or search_wiki. The description mentions the required parameters but doesn't explain the context or prerequisites for retrieving content. This leaves the agent without explicit usage instructions.

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