Skip to main content
Glama
uright

Azure DevOps Wiki MCP Server

by uright

list_wiki

Retrieve all wikis available in an Azure DevOps project to identify and access documentation repositories for content management.

Instructions

List all wikis in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationNoAzure DevOps organization name
projectNoProject name

Implementation Reference

  • The primary handler for the 'list_wiki' tool. Parses input using WikiListRequestSchema, initializes client if needed, calls client.listWikis(), and returns JSON-formatted list of wikis.
    private async handleListWiki(args: any) { const request = WikiListRequestSchema.parse(args); const organization = request.organization || this.config.defaultOrganization; const project = request.project || this.config.defaultProject; if (!organization) { throw new Error('Organization is required either as parameter or in server configuration'); } if (!project) { throw new Error('Project is required either as parameter or in server configuration'); } const client = await this.getClient(organization, project); const wikis = await client.listWikis(request); return { content: [{ type: 'text', text: JSON.stringify(wikis, null, 2) }] }; }
  • Zod schema for validating input parameters to the list_wiki tool (organization and project are optional).
    export const WikiListRequestSchema = z.object({ organization: z.string().min(1).optional(), project: z.string().min(1).optional(), });
  • src/server.ts:138-155 (registration)
    Registration of the 'list_wiki' tool in the MCP server's ListToolsRequestHandler, including name, description, and input schema definition.
    { name: 'list_wiki', description: 'List all wikis in a project', inputSchema: { type: 'object', properties: { organization: { type: 'string', description: 'Azure DevOps organization name' }, project: { type: 'string', description: 'Project name' } }, required: [] } }
  • Helper method in AzureDevOpsWikiClient that performs the actual API call to Azure DevOps WikiApi.getAllWikis(project) and maps the response to WikiInfo[] format.
    async listWikis(request: WikiListRequest): Promise<WikiInfo[]> { if (!this.wikiApi || !this.connection) { throw new Error('Azure DevOps client not initialized'); } try { const organization = request.organization || this.config.organization; const project = request.project || this.config.project; if (!organization || !project) { throw new Error('Organization and project must be provided'); } const wikis = await this.wikiApi.getAllWikis(project); if (!wikis || !Array.isArray(wikis)) { return []; } return wikis.map(wiki => ({ id: wiki.id || '', name: wiki.name || '', type: wiki.type?.toString() || '', url: wiki.url || '', project: project, repositoryId: wiki.repositoryId || '', mappedPath: wiki.mappedPath || '' })); } catch (error) { throw new Error(`Failed to list wikis: ${error instanceof Error ? error.message : String(error)}`); } }
  • TypeScript interface defining the structure of WikiInfo objects returned by the list_wiki tool.
    export interface WikiInfo { id: string; name: string; type: string; url: string; project: string; repositoryId: string; mappedPath: string;

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/uright/azure-devops-wiki-mcp'

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