Skip to main content
Glama
aashari

Atlassian Confluence MCP Server

by aashari

Confluence POST Request

conf_post

Create pages, blog posts, comments, and labels in Atlassian Confluence using API endpoints to add content to your knowledge base.

Instructions

Create Confluence resources. Returns TOON format by default (token-efficient).

IMPORTANT - Cost Optimization:

  • Use jq param to extract only needed fields from response (e.g., jq: "{id: id, title: title}")

  • Unfiltered responses include all metadata and are expensive!

Output format: TOON (default) or JSON (outputFormat: "json")

Common operations:

  1. Create page: /wiki/api/v2/pages body: {"spaceId": "123456", "status": "current", "title": "Page Title", "parentId": "789", "body": {"representation": "storage", "value": "<p>Content</p>"}}

  2. Create blog post: /wiki/api/v2/blogposts body: {"spaceId": "123456", "status": "current", "title": "Blog Title", "body": {"representation": "storage", "value": "<p>Content</p>"}}

  3. Add label: /wiki/api/v2/pages/{id}/labels - body: {"name": "label-name"}

  4. Add comment: /wiki/api/v2/pages/{id}/footer-comments

API reference: https://developer.atlassian.com/cloud/confluence/rest/v2/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe Confluence API endpoint path (without base URL). Must start with "/". Examples: "/wiki/api/v2/spaces", "/wiki/api/v2/pages", "/wiki/api/v2/pages/{id}"
queryParamsNoOptional query parameters as key-value pairs. Examples: {"limit": "25", "cursor": "...", "space-id": "123", "body-format": "storage"}
jqNoJMESPath expression to filter/transform the response. IMPORTANT: Always use this to extract only needed fields and reduce token costs. Examples: "results[*].{id: id, title: title}" (extract specific fields), "results[0]" (first result), "results[*].id" (IDs only). See https://jmespath.org
outputFormatNoOutput format: "toon" (default, 30-60% fewer tokens) or "json". TOON is optimized for LLMs with tabular arrays and minimal syntax.
bodyYesRequest body as a JSON object. Structure depends on the endpoint. Example for page: {"spaceId": "123", "title": "Page Title", "body": {"representation": "storage", "value": "<p>Content</p>"}}

Implementation Reference

  • Registers the 'conf_post' MCP tool with title, description, input schema (RequestWithBodyArgs), and the 'post' handler function.
    server.registerTool(
    	'conf_post',
    	{
    		title: 'Confluence POST Request',
    		description: CONF_POST_DESCRIPTION,
    		inputSchema: RequestWithBodyArgs,
    	},
    	post,
    );
  • Zod schema definition for input arguments to conf_post (and other write tools), including path, queryParams, jq, outputFormat, and body.
    export const RequestWithBodyArgs = z.object({
    	...BaseApiToolArgs,
    	body: bodyField,
    });
    export type RequestWithBodyArgsType = z.infer<typeof RequestWithBodyArgs>;
  • The handlePost function, which is passed to the tool handler creator and executes the POST-specific logic by calling the generic handleRequest.
    export async function handlePost(
    	options: RequestWithBodyArgsType,
    ): Promise<ControllerResponse> {
    	return handleRequest('POST', options);
    }
  • createWriteHandler creates the actual MCP tool executor function for POST/PUT/PATCH tools like conf_post. It logs args, calls the controller handler, truncates response for AI, handles errors, and formats MCP content response.
    function createWriteHandler(
    	methodName: string,
    	handler: (
    		options: RequestWithBodyArgsType,
    	) => Promise<{ content: string; rawResponsePath?: string | null }>,
    ) {
    	return async (args: Record<string, unknown>) => {
    		const methodLogger = Logger.forContext(
    			'tools/atlassian.api.tool.ts',
    			methodName.toLowerCase(),
    		);
    		methodLogger.debug(`Making ${methodName} request with args:`, {
    			path: args.path,
    			bodyKeys: args.body ? Object.keys(args.body as object) : [],
    		});
    
    		try {
    			const result = await handler(args as RequestWithBodyArgsType);
    
    			methodLogger.debug(
    				'Successfully received response from controller',
    			);
    
    			return {
    				content: [
    					{
    						type: 'text' as const,
    						text: truncateForAI(
    							result.content,
    							result.rawResponsePath,
    						),
    					},
    				],
    			};
    		} catch (error) {
    			methodLogger.error(`Failed to make ${methodName} request`, error);
    			return formatErrorForMcpTool(error);
    		}
    	};
    }
  • src/index.ts:65-65 (registration)
    Top-level call to register all Atlassian API tools, including conf_post, during MCP server initialization.
    atlassianApiTools.registerTools(serverInstance);
Behavior4/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 does this well by explaining: 1) The tool performs write operations (creating resources), 2) Important cost optimization considerations (unfiltered responses are expensive), 3) Default output format (TOON) and alternatives, 4) Common use cases with examples. It doesn't mention authentication requirements or rate limits, but provides substantial behavioral context.

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?

The description is well-structured with clear sections (IMPORTANT note, output format, common operations, API reference). However, it's quite lengthy with multiple examples and could be more front-loaded. The core purpose appears in the first sentence, but the critical cost optimization warning comes immediately after rather than being integrated more concisely.

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

Completeness4/5

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

For a mutation tool with 5 parameters, 100% schema coverage, but no annotations or output schema, the description provides substantial context. It covers purpose, usage guidelines, behavioral traits (cost optimization, output formats), parameter semantics with examples, and references external documentation. The main gap is lack of information about response structure or error handling, but given the complexity, it's quite complete.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds significant value beyond the schema by: 1) Providing concrete examples of path values for common operations, 2) Emphasizing the importance of the jq parameter for cost optimization, 3) Explaining the practical implications of outputFormat choices, 4) Showing body structure examples for specific endpoints. This goes well beyond what the schema provides.

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 tool's purpose: 'Create Confluence resources.' This is a specific verb+resource combination that distinguishes it from sibling tools like conf_get (read) and conf_delete/patch/put (other mutations). However, it doesn't explicitly mention that this is for POST requests specifically, though the title does.

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

Usage Guidelines5/5

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

The description provides excellent usage guidance with explicit alternatives. It explains when to use this tool (for creating pages, blog posts, adding labels/comments) and when to use alternatives (jq parameter for filtering to reduce token costs, outputFormat parameter for JSON vs TOON). It also references the API documentation for further details.

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/aashari/mcp-server-atlassian-confluence'

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