Skip to main content
Glama
fleagne

Backlog MCP Server

by fleagne

backlog_add_wiki

Create and add a wiki page to a Backlog project by specifying the project ID, page name, and content. Optionally enable email notifications for updates. Integrates with Backlog API for streamlined project documentation.

Instructions

Add an wiki using the Backlog Wiki API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesContent
mailNotifyNoTrue make to notify by Email
nameYesPage Name
projectIdYesProject ID

Implementation Reference

  • The handler function that executes the core logic of the 'backlog_add_wiki' tool: validates input using AddWikiParamsSchema, calls wikiService.addWiki, and formats the response.
    const handleAddWiki: ToolHandler = async (args) => {
    	try {
    		try {
    			const validatedParams = AddWikiParamsSchema.parse(args);
    
    			const text = await wikiService.addWiki(validatedParams);
    
    			return {
    				content: [
    					{
    						type: "text",
    						text: `Results for your query:\n${text}`,
    					},
    				],
    				isError: false,
    			};
    		} catch (validationError) {
    			throw new ValidationError(
    				`Invalid parameters: ${validationError instanceof Error ? validationError.message : String(validationError)}`,
    			);
    		}
    	} catch (error) {
    		return {
    			content: [
    				{
    					type: "text",
    					text: `Error: ${formatError(error)}`,
    				},
    			],
    			isError: true,
    		};
    	}
  • Maps the tool name 'backlog_add_wiki' to its handler function handleAddWiki in the toolHandlers registry.
    export const toolHandlers: Record<ToolName, ToolHandler> = {
    	backlog_get_projects: handleGetProjects,
    	backlog_get_project: handleGetProject,
    	backlog_get_issues: handleGetIssues,
    	backlog_get_issue: handleGetIssue,
    	backlog_add_issue: handleAddIssue,
    	backlog_update_issue: handleUpdateIssue,
    	backlog_delete_issue: handleDeleteIssue,
    	backlog_get_wikis: handleGetWikis,
    	backlog_get_wiki: handleGetWiki,
    	backlog_add_wiki: handleAddWiki,
    	backlog_update_wiki: handleUpdateWiki,
    	backlog_delete_wiki: handleDeleteWiki,
    };
  • Zod schema defining the input parameters for the backlog_add_wiki tool, used for validation in the handler.
    export const AddWikiParamsSchema = z.object({
    	projectId: z.number().int().describe("Project ID"),
    	name: z.string().describe("Page Name"),
    	content: z.string().describe("Content"),
    	mailNotify: z.boolean().optional().describe("True make to notify by Email"),
    });
  • Defines the MCP Tool object for 'backlog_add_wiki', including name, description, and input schema conversion.
    export const ADD_WIKI_TOOL: Tool = createTool(
    	"backlog_add_wiki",
    	"Add an wiki using the Backlog Wiki API.",
    	AddWikiParamsSchema,
    );
  • Converts the Zod AddWikiParamsSchema to JSON Schema for the MCP tool inputSchema, with required fields specified.
    if (isAddWikiParamsSchema) {
    	return {
    		type: "object" as const,
    		properties: {
    			projectId: {
    				type: "number",
    				description: "Project ID",
    			},
    			name: {
    				type: "string",
    				description: "Page Name",
    			},
    			content: {
    				type: "string",
    				description: "Content",
    			},
    			mailNotify: {
    				type: "boolean",
    				description: "True make to notify by Email",
    			},
    		},
    		required: ["projectId", "name", "content"],
    	};
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations provided. Description only says 'Add an wiki' without detailing side effects, such as whether mailNotify triggers email, or if creation overwrites existing pages. Very minimal behavioral disclosure.

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

Conciseness3/5

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

Single sentence is concise but lacks depth. Could convey more information (e.g., required parameters or return value) without added length.

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?

Tool is simple with no output schema, but description fails to mention return behavior (e.g., created wiki object) or error conditions. Lacks sufficient context for effective 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?

Schema descriptions cover all 4 parameters clearly. Description adds no additional meaning beyond schema, so baseline of 3 is appropriate.

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?

Description states 'Add an wiki' with verb and resource, clearly indicating wiki creation. Distinguishes from sibling tools like get/update/delete. However, could be more specific (e.g., 'Create a new wiki page').

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?

No guidance on when to use or not use this tool. Does not mention alternatives (e.g., use backlog_update_wiki for edits) or prerequisites like project existence.

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