Skip to main content
Glama

create_or_update_wiki_page_smart

Create or update Azure DevOps wiki pages automatically by specifying project, wiki, path, and content parameters to maintain documentation.

Instructions

Creates a new wiki page or updates existing one intelligently.

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 executes the tool logic: intelligently creates or updates a wiki page by first trying a safe update and falling back to creation if the page does not exist (404 error).
    def create_or_update_wiki_page_smart(self, project, wiki_identifier, path, content): """ Creates a new wiki page or updates existing one intelligently. """ try: # Try to update first return self.update_wiki_page_safe(project, wiki_identifier, path, content) except Exception as e: if "not found" in str(e).lower() or "404" in str(e): # Page doesn't exist, create it return self.create_wiki_page(project, wiki_identifier, path, content) else: raise e
  • Registers the tool in the MCP server's tools list, including its name, description, and input schema.
    types.Tool( name="create_or_update_wiki_page_smart", description="Creates a new wiki page or updates existing one intelligently.", 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 } ),
  • Defines the input schema for validating the tool's parameters: project, wiki_identifier, path, and 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 }
  • Server-side dispatch logic that calls the client handler with arguments and formats the response for MCP protocol.
    elif name == "create_or_update_wiki_page_smart": page = self.client.create_or_update_wiki_page_smart(**arguments) return { "path": page.page.path, "url": page.page.url, "content": page.page.content, "message": "Wiki page created or updated successfully." }

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