Skip to main content
Glama

move_wiki_page

Move Azure DevOps wiki pages to reorganize content structure. Specify project, wiki, source, and destination paths to relocate pages.

Instructions

Move a wiki page from one location to another atomically. Perfect for reorganizing wiki structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
wiki_identifierYesThe name or ID of the wiki.
from_pathYesThe current path of the wiki page to move.
to_pathYesThe target path where the wiki page should be moved.

Implementation Reference

  • The core implementation of the move_wiki_page tool. Retrieves the source page content, creates a new page at the target path with the same content, deletes the original page, and handles partial failures gracefully.
    def move_wiki_page(self, project, wiki_identifier, from_path, to_path):
        """
        Move a wiki page from one location to another atomically.
        This involves getting the source content, creating at target, and deleting original.
        """
        try:
            # Step 1: Get the source page content
            source_page = self.wiki_client.get_page(
                project=project,
                wiki_identifier=wiki_identifier,
                path=from_path,
                include_content=True
            )
            
            if not source_page or not source_page.page:
                raise Exception(f"Source page '{from_path}' not found")
            
            source_content = source_page.page.content or ""
            
            # Step 2: Create the page at the target location
            try:
                target_page = self.create_wiki_page(
                    project=project,
                    wiki_identifier=wiki_identifier,
                    path=to_path,
                    content=source_content
                )
            except Exception as create_error:
                raise Exception(f"Failed to create page at target location '{to_path}': {str(create_error)}")
            
            # Step 3: Delete the original page (only if creation succeeded)
            try:
                self.delete_wiki_page(
                    project=project,
                    wiki_identifier=wiki_identifier,
                    path=from_path
                )
            except Exception as delete_error:
                # If deletion fails, we should warn but not fail the whole operation
                # since the content is now at the target location
                return {
                    "status": "partial_success",
                    "message": f"Page moved to '{to_path}' but failed to delete original at '{from_path}': {str(delete_error)}",
                    "from_path": from_path,
                    "to_path": to_path,
                    "target_page": {
                        "path": target_page.page.path,
                        "url": target_page.page.url
                    },
                    "warning": f"Original page at '{from_path}' still exists and may need manual deletion"
                }
            
            # Success - both operations completed
            return {
                "status": "success",
                "message": f"Page successfully moved from '{from_path}' to '{to_path}'",
                "from_path": from_path,
                "to_path": to_path,
                "target_page": {
                    "path": target_page.page.path,
                    "url": target_page.page.url
                }
            }
            
        except Exception as e:
            # Complete failure - operation couldn't proceed
            raise Exception(f"Failed to move wiki page from '{from_path}' to '{to_path}': {str(e)}")
  • Registers the move_wiki_page tool with the MCP server, including its description and input schema definition.
        name="move_wiki_page",
        description="Move a wiki page from one location to another atomically. Perfect for reorganizing wiki structure.",
        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."
                },
                "from_path": {
                    "type": "string", 
                    "description": "The current path of the wiki page to move."
                },
                "to_path": {
                    "type": "string", 
                    "description": "The target path where the wiki page should be moved."
                },
            },
            "required": ["project", "wiki_identifier", "from_path", "to_path"],
            "additionalProperties": False
        }
    ),
  • MCP server handler dispatch that calls the Azure DevOps client's move_wiki_page method with unpacked arguments.
    elif name == "move_wiki_page":
        return self.client.move_wiki_page(**arguments)
  • Input schema defining parameters for the move_wiki_page tool: project, wiki_identifier, from_path, to_path.
        "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."
            },
            "from_path": {
                "type": "string", 
                "description": "The current path of the wiki page to move."
            },
            "to_path": {
                "type": "string", 
                "description": "The target path where the wiki page should be moved."
            },
        },
        "required": ["project", "wiki_identifier", "from_path", "to_path"],
        "additionalProperties": False
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds value by specifying 'atomically' (implying transactional safety) and 'perfect for reorganizing wiki structure' (suggesting a use case), but it does not cover permissions, error handling, rate limits, or what happens to links/redirects after the move. This is adequate but lacks depth for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero waste: the first states the core functionality, and the second provides usage context. It is front-loaded with the main action and efficiently conveys essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is moderately complete for a mutation tool. It covers the purpose and hints at behavior but lacks details on permissions, side effects, or return values. For a tool that modifies wiki structure, more behavioral context would be beneficial to fully inform the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all four parameters. The description does not add any parameter-specific details beyond what the schema provides, such as path format examples or constraints. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('move a wiki page') and resource ('wiki page'), distinguishing it from siblings like 'delete_wiki_page' or 'update_wiki_page' by focusing on relocation rather than deletion or content modification. It also specifies the scope ('from one location to another') and adds the qualifier 'atomically' to indicate transactional behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for 'reorganizing wiki structure,' which provides some context, but it does not explicitly state when to use this tool versus alternatives like 'update_wiki_page' for content changes or 'delete_wiki_page' for removal. No exclusions or prerequisites are mentioned, leaving gaps in guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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