Skip to main content
Glama
mmruesch12
by mmruesch12

create_wiki_page

Automate wiki page creation in Azure DevOps with a structured input system, specifying project, wiki name, path, and content for streamlined documentation.

Instructions

Create a new wiki page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesContent of the wiki page
pathYesPath of the wiki page
projectYesName of the Azure DevOps project
wikiYesName of the wiki

Implementation Reference

  • The core handler function that executes the logic for creating a wiki page in Azure DevOps, including wiki creation if needed, parameter validation, and API calls.
    export async function createWikiPage(rawParams: any) {
      // Parse arguments with defaults from environment variables
      const params = createWikiPageSchema.parse({
        project: rawParams.project || DEFAULT_PROJECT,
        wiki: rawParams.wiki,
        path: rawParams.path,
        content: rawParams.content,
      });
    
      console.error("[API] Creating wiki page:", params.path);
    
      try {
        // First try to get all wikis in the project
        const wikiListUrl = `${ORG_URL}/${params.project}/_wiki/wikis/${params.wiki}?api-version=7.1-preview.1`;
        console.error("[API] Getting wikis from:", wikiListUrl);
        const wikis = await makeAzureDevOpsRequest(wikiListUrl);
        console.error("[API] Found wikis:", wikis);
    
        // Try to find existing wiki
        let wiki = wikis.value.find((w: any) => w.name === params.wiki);
    
        if (!wiki) {
          // Create new project wiki
          console.error("[API] Creating new project wiki");
          const createWikiUrl = `${ORG_URL}/${params.project}/_wiki/wikis?api-version=7.1-preview.1`;
          wiki = await makeAzureDevOpsRequest(createWikiUrl, "POST", {
            name: `${params.wiki}.wiki`,
            projectId: params.project,
            type: "projectWiki",
          });
          console.error("[API] Created wiki:", wiki);
        }
    
        // Create the page using REST API
        const pageUrl = `${ORG_URL}/${params.project}/_wiki/wikis/${
          wiki.id
        }/pages?path=${encodeURIComponent(params.path)}&api-version=7.1-preview.1`;
        const page = await makeAzureDevOpsRequest(pageUrl, "PUT", {
          content: params.content,
        });
        console.error("[API] Created page:", page);
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(page, null, 2),
            },
          ],
        };
      } catch (error) {
        logError("Error creating wiki page", error);
        throw error;
      }
    }
  • Zod schema definition for input parameters of create_wiki_page tool, used for runtime validation in the handler.
    export const createWikiPageSchema = z.object({
      project: z.string(),
      wiki: z.string(),
      path: z.string(),
      content: z.string(),
    });
    
    export type CreateWikiPageParams = z.infer<typeof createWikiPageSchema>;
  • Tool registration object defining the name, description, and input schema for create_wiki_page, part of wikiTools array used by the MCP server.
    {
      name: "create_wiki_page",
      description: "Create a new wiki page",
      inputSchema: {
        type: "object",
        properties: {
          project: {
            type: "string",
            description: "Name of the Azure DevOps project",
          },
          wiki: {
            type: "string",
            description: "Name of the wiki",
          },
          path: {
            type: "string",
            description: "Path of the wiki page",
          },
          content: {
            type: "string",
            description: "Content of the wiki page",
          },
        },
        required: ["project", "wiki", "path", "content"],
      },
    },
  • src/index.ts:50-63 (registration)
    MCP server handler for listing tools, which includes the wikiTools containing create_wiki_page.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          // Work Items
          ...workItemTools,
          // Pull Requests
          ...pullRequestTools,
          // Wiki
          ...wikiTools,
          // Projects
          ...projectTools,
        ],
      };
    });
  • src/index.ts:91-92 (registration)
    Dispatch case in the main CallToolRequest handler that routes calls to create_wiki_page to the handler function.
    case "create_wiki_page":
      return await createWikiPage(request.params.arguments || {});
Behavior2/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 but offers minimal information. It states this is a creation operation, implying it's a write/mutation tool, but doesn't cover critical aspects like required permissions, whether it overwrites existing pages, error conditions, or what happens on success. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 extremely concise with just four words ('Create a new wiki page'), making it front-loaded and efficient. Every word contributes directly to the core purpose without any wasted text, meeting the ideal standard for brevity in tool descriptions.

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?

Given the complexity of a creation tool with 4 required parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, error handling, dependencies on other tools (like needing an existing project/wiki), or how it interacts with sibling tools. This leaves significant gaps for an AI agent to understand the full context of use.

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?

The input schema has 100% description coverage, with clear parameter descriptions (e.g., 'Content of the wiki page', 'Path of the wiki page'). The description adds no additional parameter semantics beyond what the schema already provides. According to the rules, when schema_description_coverage is high (>80%), the baseline score is 3 even with no param info in the description, which applies here.

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 a new wiki page' clearly states the verb ('Create') and resource ('wiki page'), making the purpose immediately understandable. However, it doesn't differentiate from the sibling tool 'edit_wiki_page' beyond the basic action, missing an opportunity to clarify the distinction between creation and editing operations.

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. There's no mention of prerequisites (e.g., needing an existing project/wiki), when not to use it (e.g., for updating existing pages), or explicit alternatives like 'edit_wiki_page' for modifications. This leaves the agent without contextual usage instructions.

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

Related 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/mmruesch12/azdo-mcp'

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