Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

wiki_get_wiki

Retrieve wiki content by specifying a unique identifier and project name or ID using the Azure DevOps MCP Server with PAT Authentication.

Instructions

Get the wiki by wikiIdentifier

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoThe project name or ID where the wiki is located. If not provided, the default project will be used.
wikiIdentifierYesThe unique identifier of the wiki.

Implementation Reference

  • The handler function that executes the logic for the wiki_get_wiki tool. It uses the Azure DevOps Wiki API to retrieve wiki details by wikiIdentifier and optional project, returning JSON or error message.
    async ({ wikiIdentifier, project }) => { try { const connection = await connectionProvider(); const wikiApi = await connection.getWikiApi(); const wiki = await wikiApi.getWiki(wikiIdentifier, project); if (!wiki) { return { content: [{ type: "text", text: "No wiki found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(wiki, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching wiki: ${errorMessage}` }], isError: true, }; } }
  • Zod input schema defining parameters for the wiki_get_wiki tool: required wikiIdentifier (string) and optional project (string).
    { wikiIdentifier: z.string().describe("The unique identifier of the wiki."), project: z.string().optional().describe("The project name or ID where the wiki is located. If not provided, the default project will be used."), },
  • MCP server tool registration for 'wiki_get_wiki', specifying name, description, input schema, and handler function within configureWikiTools.
    server.tool( WIKI_TOOLS.get_wiki, "Get the wiki by wikiIdentifier", { wikiIdentifier: z.string().describe("The unique identifier of the wiki."), project: z.string().optional().describe("The project name or ID where the wiki is located. If not provided, the default project will be used."), }, async ({ wikiIdentifier, project }) => { try { const connection = await connectionProvider(); const wikiApi = await connection.getWikiApi(); const wiki = await wikiApi.getWiki(wikiIdentifier, project); if (!wiki) { return { content: [{ type: "text", text: "No wiki found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(wiki, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching wiki: ${errorMessage}` }], isError: true, }; } } );
  • Constant object defining string constants for wiki-related tool names, including 'wiki_get_wiki'.
    const WIKI_TOOLS = { list_wikis: "wiki_list_wikis", get_wiki: "wiki_get_wiki", list_wiki_pages: "wiki_list_pages", get_wiki_page_content: "wiki_get_page_content", create_or_update_page: "wiki_create_or_update_page", };

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