Skip to main content
Glama

confluence_add_labels

Add labels or tags to any Confluence page by specifying the page ID and an array of label names.

Instructions

Add labels (tags) to a Confluence page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesThe ID of the page
labelsYesArray of label names to add

Implementation Reference

  • Helper function that makes the API call to add labels to a Confluence page. It transforms label names into the required payload format (with prefix: 'global') and POSTs to the Confluence REST API endpoint.
    /**
     * Add labels to a page
     */
    async function addLabels(pageId, labels) {
      try {
        const payload = labels.map(name => ({
          prefix: 'global',
          name
        }));
    
        const response = await client.post(
          `${CONFLUENCE_API_BASE}/content/${pageId}/label`,
          payload
        );
        return response.data;
      } catch (error) {
        throw new Error(`Failed to add labels: ${error.message}`);
      }
    }
  • index.js:363-381 (registration)
    Registration of the 'confluence_add_labels' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema (pageId string and labels array, both required).
    {
      name: 'confluence_add_labels',
      description: 'Add labels (tags) to a Confluence page',
      inputSchema: {
        type: 'object',
        properties: {
          pageId: {
            type: 'string',
            description: 'The ID of the page',
          },
          labels: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of label names to add',
          },
        },
        required: ['pageId', 'labels'],
      },
    },
  • Handler case in CallToolRequestSchema that invokes the addLabels helper with pageId and labels arguments from the tool call.
    case 'confluence_add_labels': {
      const result = await addLabels(args.pageId, args.labels);
      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?

No annotations provided, so description must disclose behavior. Only states 'add labels' without clarifying whether labels are appended or replaced, or any side effects.

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

Conciseness4/5

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

Single sentence is concise, but lacks structure and front-loading of critical details.

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

Completeness3/5

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

Simple tool with two straightforward parameters. Missing details on return value or success indication, but adequate for basic understanding.

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 covers 100% of parameters with basic descriptions. Tool 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.

Purpose5/5

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

Clear verb ('Add labels') and resource ('Confluence page'), distinct from sibling tools which focus on page creation, retrieval, and search.

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 this tool versus alternatives. Does not mention prerequisites, limitations, or when not to use.

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/gkrauchunas-arlo/confluence-mcp'

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