Skip to main content
Glama

update_wiki_page

Modify Azure DevOps wiki pages by updating content in markdown format with optional comments for tracking changes.

Instructions

Update 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
pagePathYesPath of the wiki page to update
contentYesThe new content for the wiki page in markdown format
commentNoOptional comment for the update

Implementation Reference

  • The main handler function that executes the logic to update a wiki page using the Azure DevOps wiki client.
    export async function updateWikiPage(options: UpdateWikiPageOptions) { const validatedOptions = UpdateWikiPageSchema.parse(options); const { organizationId, projectId, wikiId, pagePath, content, comment } = validatedOptions; // Create the client const client = await azureDevOpsClient.getWikiClient({ organizationId: organizationId ?? defaultOrg, }); // Prepare the wiki page content const wikiPageContent = { content, }; // Update the wiki page const updatedPage = await client.updatePage( wikiPageContent, projectId ?? defaultProject, wikiId, pagePath, { comment: comment ?? undefined, }, ); return updatedPage; }
  • Zod schema defining the input parameters and validation for the update_wiki_page tool.
    export const UpdateWikiPageSchema = 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().min(1).describe('The ID or name of the wiki'), pagePath: z.string().min(1).describe('Path of the wiki page to update'), content: z .string() .min(1) .describe('The new content for the wiki page in markdown format'), comment: z .string() .optional() .nullable() .describe('Optional comment for the update'), });
  • Tool definition registration in the wikis tools array, specifying name, description, and input schema.
    { name: 'update_wiki_page', description: 'Update content of a wiki page', inputSchema: zodToJsonSchema(UpdateWikiPageSchema), },
  • Dispatching logic in the wikis request handler that invokes updateWikiPage for the 'update_wiki_page' tool name.
    case 'update_wiki_page': { const args = UpdateWikiPageSchema.parse(request.params.arguments); const result = await updateWikiPage({ organizationId: args.organizationId ?? defaultOrg, projectId: args.projectId ?? defaultProject, wikiId: args.wikiId, pagePath: args.pagePath, content: args.content, comment: args.comment, }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], };
  • Export statement registering the handler and schema from the update-wiki-page feature module.
    export { updateWikiPage, UpdateWikiPageSchema } from './update-wiki-page';

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