Skip to main content
Glama

update_wiki_page

Modify existing wiki pages in Azure DevOps projects by updating content, project details, and page paths to maintain documentation accuracy.

Instructions

Updates an existing wiki page with new content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
wiki_identifierYesThe name or ID of the wiki.
pathYesThe path of the wiki page.
contentYesThe content of the wiki page.

Implementation Reference

  • The core handler function that implements the logic for updating a wiki page. It retrieves the current page to get the ETag for optimistic concurrency, then calls the Azure DevOps wiki_client to create or update the page with the new content.
    def update_wiki_page(self, project, wiki_identifier, path, content): page = self.wiki_client.get_page( project=project, wiki_identifier=wiki_identifier, path=path ) # Try to get ETag from various possible locations etag = None if hasattr(page, 'eTag'): etag = page.eTag elif hasattr(page, 'etag'): etag = page.etag elif hasattr(page, 'e_tag'): etag = page.e_tag elif hasattr(page, '_etag'): etag = page._etag elif hasattr(page, 'page') and hasattr(page.page, 'eTag'): etag = page.page.eTag elif hasattr(page, 'page') and hasattr(page.page, 'etag'): etag = page.page.etag elif hasattr(page, 'page') and hasattr(page.page, 'e_tag'): etag = page.page.e_tag parameters = { "content": content } return self.wiki_client.create_or_update_page( project=project, wiki_identifier=wiki_identifier, path=path, parameters=parameters, version=etag )
  • Defines the tool schema including name, description, and input schema validation for the update_wiki_page tool, which is registered in the MCP server's tool list.
    types.Tool( name="update_wiki_page", description="Updates an existing wiki page with new content.", inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, "wiki_identifier": { "type": "string", "description": "The name or ID of the wiki." }, "path": { "type": "string", "description": "The path of the wiki page." }, "content": { "type": "string", "description": "The content of the wiki page." }, }, "required": ["project", "wiki_identifier", "path", "content"], "additionalProperties": False } ),
  • The registration and dispatch logic in the MCP server's _execute_tool method that handles calls to 'update_wiki_page' by invoking the client method and formatting the response.
    elif name == "update_wiki_page": page = self.client.update_wiki_page(**arguments) return { "path": page.page.path, "url": page.page.url, "content": page.page.content, }

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

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