Skip to main content
Glama
stefanskiasan

Azure DevOps MCP Server for Cline

update_wiki_page

Create or modify Azure DevOps wiki pages with markdown content to maintain project documentation and share knowledge across teams.

Instructions

Create or update a wiki page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wikiIdentifierYesWiki identifier
pathYesPage path
contentYesPage content in markdown format
commentNoComment for the update (optional)

Implementation Reference

  • Core handler function that implements the logic for updating a wiki page, including validation, wiki retrieval, and response formatting (noting current API limitations).
    export async function updateWikiPage(args: UpdateWikiPageArgs, config: AzureDevOpsConfig) {
      if (!args.wikiIdentifier || !args.path || !args.content) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Wiki identifier, page path, and content are required'
        );
      }
    
      AzureDevOpsConnection.initialize(config);
      const connection = AzureDevOpsConnection.getInstance();
      const wikiApi = await connection.getWikiApi();
    
      try {
        const wiki = await wikiApi.getWiki(config.project, args.wikiIdentifier);
        if (!wiki || !wiki.id) {
          throw new McpError(
            ErrorCode.InvalidParams,
            `Wiki ${args.wikiIdentifier} not found`
          );
        }
    
        const updateParams = {
          content: args.content,
          comment: args.comment || `Updated page ${args.path}`,
        };
    
        // Da die Wiki-API keine direkte Methode zum Aktualisieren von Seiten bietet,
        // geben wir vorerst nur die Wiki-Informationen zurück
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                wiki,
                path: args.path,
                message: 'Wiki page update is not supported in the current API version',
                requestedUpdate: updateParams
              }, null, 2),
            },
          ],
        };
      } catch (error: unknown) {
        if (error instanceof McpError) throw error;
        const errorMessage = error instanceof Error ? error.message : 'Unknown error';
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to update wiki page: ${errorMessage}`
        );
      }
    }
  • Tool input schema definition for update_wiki_page, specifying parameters and requirements.
    {
      name: 'update_wiki_page',
      description: 'Create or update a wiki page',
      inputSchema: {
        type: 'object',
        properties: {
          wikiIdentifier: {
            type: 'string',
            description: 'Wiki identifier',
          },
          path: {
            type: 'string',
            description: 'Page path',
          },
          content: {
            type: 'string',
            description: 'Page content in markdown format',
          },
          comment: {
            type: 'string',
            description: 'Comment for the update (optional)',
          },
        },
        required: ['wikiIdentifier', 'path', 'content'],
      },
    },
  • Registration of wiki tools including the updateWikiPage handler binding and definitions export.
    export const wikiTools = {
      initialize: (config: AzureDevOpsConfig) => ({
        getWikis: (args: Record<string, never>) => getWikis(args, config),
        getWikiPage: (args: { wikiIdentifier: string; path: string; version?: string; includeContent?: boolean }) =>
          getWikiPage(args, config),
        createWiki: (args: { name: string; projectId?: string; mappedPath?: string }) =>
          createWiki(args, config),
        updateWikiPage: (args: { wikiIdentifier: string; path: string; content: string; comment?: string }) =>
          updateWikiPage(args, config),
        definitions,
      }),
      definitions,
    };
  • src/index.ts:148-150 (registration)
    Main server dispatch/registration for the update_wiki_page tool call.
    case 'update_wiki_page':
      result = await tools.wiki.updateWikiPage(request.params.arguments);
      break;
  • TypeScript interface defining the arguments for the updateWikiPage function.
    interface UpdateWikiPageArgs {
      wikiIdentifier: string;
      path: string;
      content: string;
      comment?: string;
    }
  • WikiApi class method for updating wiki pages via direct API fetch (PUT request), used as helper in the tool ecosystem.
    async updateWikiPage(
      wikiIdentifier: string,
      path: string,
      content: string,
      comment?: string
    ): Promise<WikiPageUpdateResponse> {
      const authHeader = await this.getAuthHeader();
      const encodedPath = encodeURIComponent(path);
      const response = await fetch(
        `${this.baseUrl}/${wikiIdentifier}/pages?path=${encodedPath}&api-version=7.0`,
        {
          method: 'PUT',
          headers: {
            'Content-Type': 'application/json',
            Authorization: authHeader,
          },
          body: JSON.stringify({
            content,
            comment: comment || `Updated page ${path}`,
          }),
        }
      );
    
      if (response.status === 404) {
        if (response.statusText.includes('Wiki not found')) {
          throw new WikiNotFoundError(wikiIdentifier);
        }
        throw new WikiPageNotFoundError(wikiIdentifier, path);
      }
    
      if (!response.ok) {
        throw new WikiError(
          `Failed to update wiki page: ${response.statusText}`,
          response.status,
          wikiIdentifier,
          path,
          await response.text()
        );
      }
    
      return response.json();
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Create or update' implies mutation but doesn't specify permissions needed, whether changes are reversible, rate limits, or what happens when updating versus creating. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for the tool's complexity and gets straight to the point without unnecessary elaboration.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens on creation versus update, what the response looks like, or any error conditions. Given the complexity of a wiki page operation with 4 parameters, more context is needed.

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 parameters are fully documented in the schema. The description adds no additional parameter information beyond what's already in the structured fields. This meets the baseline expectation when schema does the heavy lifting.

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

Purpose4/5

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

The description 'Create or update a wiki page' clearly states the verb (create/update) and resource (wiki page), making the purpose immediately understandable. However, it doesn't differentiate from sibling 'create_wiki' which might create an entire wiki versus a page, leaving some ambiguity about sibling tool boundaries.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'create_wiki' or 'update_work_item'. It doesn't specify prerequisites, conditions for creation versus update, or any context about when this is the appropriate choice among available tools.

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

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