Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

create_wiki

Create a new wiki in Azure DevOps projects to document processes, code, and team knowledge. Specify wiki type (project or code) and configure repository settings for collaborative documentation.

Instructions

Create a new wiki in the project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdNoThe ID or name of the organization (Default: mycompany)
projectIdNoThe ID or name of the project (Default: MyProject)
nameYesThe name of the new wiki
typeNoType of wiki to create (projectWiki or codeWiki)projectWiki
repositoryIdNoThe ID of the repository to associate with the wiki (required for codeWiki)
mappedPathNoFolder path inside repository which is shown as Wiki (only for codeWiki)/

Implementation Reference

  • Core handler function that implements the create_wiki tool logic, using Azure DevOps Wiki client to create a new wiki.
    export async function createWiki(
      _connection: WebApi,
      options: CreateWikiOptions,
    ) {
      try {
        const {
          name,
          projectId,
          type = WikiType.ProjectWiki,
          repositoryId,
          mappedPath = '/',
        } = options;
    
        // Validate repository ID for code wiki
        if (type === WikiType.CodeWiki && !repositoryId) {
          throw new AzureDevOpsValidationError(
            'Repository ID is required for code wikis',
          );
        }
    
        // Get the Wiki client
        const wikiClient = await getWikiClient({
          organizationId: options.organizationId,
        });
    
        // Prepare the wiki creation parameters
        const wikiCreateParams = {
          name,
          projectId: projectId!,
          type,
          ...(type === WikiType.CodeWiki && {
            repositoryId,
            mappedPath,
            version: {
              version: 'main',
              versionType: 'branch' as const,
            },
          }),
        };
    
        // Create the wiki
        return await wikiClient.createWiki(projectId!, wikiCreateParams);
      } catch (error) {
        // Just rethrow if it's already one of our error types
        if (error instanceof AzureDevOpsError) {
          throw error;
        }
    
        // Otherwise wrap in AzureDevOpsError
        throw new AzureDevOpsError(
          `Failed to create wiki: ${error instanceof Error ? error.message : String(error)}`,
        );
      }
    }
  • Zod schema defining input parameters for the create_wiki tool, including validation for codeWiki requiring repositoryId.
    export const CreateWikiSchema = 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})`),
        name: z.string().describe('The name of the new wiki'),
        type: z
          .nativeEnum(WikiType)
          .optional()
          .default(WikiType.ProjectWiki)
          .describe('Type of wiki to create (projectWiki or codeWiki)'),
        repositoryId: z
          .string()
          .optional()
          .nullable()
          .describe(
            'The ID of the repository to associate with the wiki (required for codeWiki)',
          ),
        mappedPath: z
          .string()
          .optional()
          .nullable()
          .default('/')
          .describe(
            'Folder path inside repository which is shown as Wiki (only for codeWiki)',
          ),
      })
      .refine(
        (data) => {
          // If type is codeWiki, then repositoryId is required
          return data.type !== WikiType.CodeWiki || !!data.repositoryId;
        },
        {
          message: 'repositoryId is required when type is codeWiki',
          path: ['repositoryId'],
        },
      );
  • Tool registration in the wikis tools array, specifying name, description, and input schema.
    {
      name: 'create_wiki',
      description: 'Create a new wiki in the project',
      inputSchema: zodToJsonSchema(CreateWikiSchema),
    },
  • Enum defining WikiType used in CreateWikiSchema.
    export enum WikiType {
      /**
       * The wiki is published from a git repository
       */
      CodeWiki = 'codeWiki',
    
      /**
       * The wiki is provisioned for the team project
       */
      ProjectWiki = 'projectWiki',
    }
  • Dispatcher in handleWikisRequest that parses input with schema and calls the createWiki handler.
    case 'create_wiki': {
      const args = CreateWikiSchema.parse(request.params.arguments);
      const result = await createWiki(connection, {
        organizationId: args.organizationId ?? defaultOrg,
        projectId: args.projectId ?? defaultProject,
        name: args.name,
        type: args.type,
        repositoryId: args.repositoryId ?? undefined,
        mappedPath: args.mappedPath ?? undefined,
      });
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
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. It states this is a creation operation (implying mutation), but doesn't mention permissions required, whether wikis can be deleted/updated, what happens on duplicate names, or the format of the response. For a creation tool with zero annotation coverage, this leaves critical behavioral aspects unspecified.

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 that states the core purpose without unnecessary words. It's appropriately sized for a creation tool and front-loads the essential information ('create a new wiki'). Every word earns its place with no redundancy or fluff.

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 creation tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what a wiki is in this system, the difference between wiki types, required permissions, or what the tool returns. The agent must rely entirely on the input schema for operational details, leaving behavioral and contextual gaps.

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 already documents all 6 parameters thoroughly with descriptions, defaults, and enum values. The description adds no parameter-specific information beyond what's in the schema (e.g., it doesn't explain the relationship between 'type' and 'repositoryId', or clarify what 'mappedPath' means). Baseline 3 is appropriate when the 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 clearly states the action ('create') and resource ('new wiki in the project'), making the purpose immediately understandable. It distinguishes from siblings like 'create_wiki_page' (which creates pages within wikis) and 'get_wikis' (which retrieves existing wikis). However, it doesn't specify what a 'wiki' entails in this context (e.g., documentation space vs. code wiki).

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. It doesn't mention prerequisites (e.g., needing a project first), differentiate between 'codeWiki' and 'projectWiki' types, or explain when to choose this over creating wiki pages. The agent must infer usage from parameter names and sibling tools alone.

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

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