Skip to main content
Glama

get_wiki_page

Retrieve wiki page content from Azure DevOps by specifying wiki ID and page path to access project documentation.

Instructions

Get the content of a wiki page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdNoThe ID or name of the organization (Default: mycompany)
projectIdNoThe ID or name of the project (Default: MyProject)
wikiIdYesThe ID or name of the wiki
pagePathYesThe path of the page within the wiki

Implementation Reference

  • The core handler function that implements the logic to fetch and return the content of a specified wiki page using the Azure DevOps Wiki client.
    export async function getWikiPage( options: GetWikiPageOptions, ): Promise<string> { const { organizationId, projectId, wikiId, pagePath } = options; try { // Create the client const client = await azureDevOpsClient.getWikiClient({ organizationId, }); // Get the wiki page return (await client.getPage(projectId, wikiId, pagePath)).content; } catch (error) { // If it's already an AzureDevOpsError, rethrow it if (error instanceof AzureDevOpsError) { throw error; } // Otherwise wrap it in an AzureDevOpsError throw new AzureDevOpsError('Failed to get wiki page', { cause: error }); } }
  • Zod schema defining the input parameters for the get_wiki_page tool, including organizationId, projectId, wikiId, and pagePath with descriptions and defaults.
    export const GetWikiPageSchema = z.object({ organizationId: z .string() .optional() .nullable() .describe(`The ID or name of the organization (Default: ${defaultOrg})`), projectId: z .string() .optional() .nullable() .describe(`The ID or name of the project (Default: ${defaultProject})`), wikiId: z.string().describe('The ID or name of the wiki'), pagePath: z.string().describe('The path of the page within the wiki'), });
  • Registration of the get_wiki_page tool in the wikisTools array, specifying name, description, and input schema.
    { name: 'get_wiki_page', description: 'Get the content of a wiki page', inputSchema: zodToJsonSchema(GetWikiPageSchema), },
  • Handler case in handleWikisRequest that parses arguments with the schema and invokes the getWikiPage function for the 'get_wiki_page' tool name.
    case 'get_wiki_page': { const args = GetWikiPageSchema.parse(request.params.arguments); const result = await getWikiPage({ organizationId: args.organizationId ?? defaultOrg, projectId: args.projectId ?? defaultProject, wikiId: args.wikiId, pagePath: args.pagePath, }); return { content: [{ type: 'text', text: result }], }; }

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

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