Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

wiki_list_wikis

Retrieve a list of wikis for Azure DevOps organizations or specific projects using PAT authentication. Simplify wiki management by filtering results by project name or ID.

Instructions

Retrieve a list of wikis for an organization or project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoThe project name or ID to filter wikis. If not provided, all wikis in the organization will be returned.

Implementation Reference

  • The core handler logic for the "wiki_list_wikis" tool. It uses the Azure DevOps WikiApi to fetch all wikis for the given project (or organization-wide if no project specified), and returns the JSON serialized list or an error message.
    async ({ project }) => { try { const connection = await connectionProvider(); const wikiApi = await connection.getWikiApi(); const wikis = await wikiApi.getAllWikis(project); if (!wikis) { return { content: [{ type: "text", text: "No wikis found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(wikis, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching wikis: ${errorMessage}` }], isError: true, }; }
  • Input schema definition for the tool using Zod, with optional 'project' parameter.
    { project: z.string().optional().describe("The project name or ID to filter wikis. If not provided, all wikis in the organization will be returned."), },
  • Direct registration of the "wiki_list_wikis" tool on the McpServer instance within configureWikiTools.
    server.tool( WIKI_TOOLS.list_wikis, "Retrieve a list of wikis for an organization or project.", { project: z.string().optional().describe("The project name or ID to filter wikis. If not provided, all wikis in the organization will be returned."), }, async ({ project }) => { try { const connection = await connectionProvider(); const wikiApi = await connection.getWikiApi(); const wikis = await wikiApi.getAllWikis(project); if (!wikis) { return { content: [{ type: "text", text: "No wikis found" }], isError: true }; } return { content: [{ type: "text", text: JSON.stringify(wikis, null, 2) }], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error occurred"; return { content: [{ type: "text", text: `Error fetching wikis: ${errorMessage}` }], isError: true, }; } }
  • Constant mapping internal name to tool name string "wiki_list_wikis" in WIKI_TOOLS object.
    list_wikis: "wiki_list_wikis",
  • src/tools.ts:26-26 (registration)
    Invocation of configureWikiTools in configureAllTools, which registers the wiki tools including "wiki_list_wikis".
    configureWikiTools(server, tokenProvider, connectionProvider);

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