Skip to main content
Glama
stefanskiasan

Azure DevOps MCP Server for Cline

get_wiki_page

Retrieve Azure DevOps wiki pages by specifying the wiki identifier and page path to access documentation or content stored in the wiki.

Instructions

Get a wiki page by path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wikiIdentifierYesWiki identifier
pathYesPage path
versionNoVersion (optional, defaults to main)
includeContentNoInclude page content (optional, defaults to true)

Implementation Reference

  • The primary handler function implementing the get_wiki_page tool logic. It validates input arguments, initializes the Azure DevOps connection, fetches wiki information using WikiApi, and returns a formatted MCP response (noting current limitation on page content).
    export async function getWikiPage(args: GetWikiPageArgs, config: AzureDevOpsConfig) { if (!args.wikiIdentifier || !args.path) { throw new McpError( ErrorCode.InvalidParams, 'Wiki identifier and page path are required' ); } AzureDevOpsConnection.initialize(config); const connection = AzureDevOpsConnection.getInstance(); const wikiApi = await connection.getWikiApi(); try { // Get wiki information const wiki = await wikiApi.getWiki(config.project, args.wikiIdentifier); if (!wiki || !wiki.id) { throw new McpError( ErrorCode.InvalidParams, `Wiki ${args.wikiIdentifier} not found` ); } // For now, we can only return the wiki information since the page API is not available return { content: [ { type: 'text', text: JSON.stringify({ id: wiki.id, name: wiki.name, path: args.path, message: 'Wiki page content retrieval is not supported in the current API version' }, null, 2), }, ], }; } catch (error: unknown) { if (error instanceof McpError) throw error; const errorMessage = error instanceof Error ? error.message : 'Unknown error'; throw new McpError( ErrorCode.InternalError, `Failed to get wiki page: ${errorMessage}` ); } }
  • The input schema definition for the get_wiki_page tool, specifying properties, descriptions, and required fields.
    name: 'get_wiki_page', description: 'Get a wiki page by path', inputSchema: { type: 'object', properties: { wikiIdentifier: { type: 'string', description: 'Wiki identifier', }, path: { type: 'string', description: 'Page path', }, version: { type: 'string', description: 'Version (optional, defaults to main)', }, includeContent: { type: 'boolean', description: 'Include page content (optional, defaults to true)', }, }, required: ['wikiIdentifier', 'path'], },
  • TypeScript interface defining the arguments for the getWikiPage handler function.
    interface GetWikiPageArgs { wikiIdentifier: string; path: string; version?: string; includeContent?: boolean; }
  • Wrapper function in wikiTools.initialize that binds the getWikiPage handler with config for tool invocation.
    getWikiPage: (args: { wikiIdentifier: string; path: string; version?: string; includeContent?: boolean }) => getWikiPage(args, config),
  • src/index.ts:142-143 (registration)
    Dispatch logic in the main MCP server that routes 'get_wiki_page' tool calls to the wiki tools instance.
    case 'get_wiki_page': result = await tools.wiki.getWikiPage(request.params.arguments);

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

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