Skip to main content
Glama
aaronsb

Confluence MCP Server

get_confluence_space

Retrieve detailed information about a specific Confluence space by providing its unique ID to access space configurations and content structure.

Instructions

Get details about a specific space

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceIdYesID of the space to retrieve

Implementation Reference

  • The main handler function for the 'get_confluence_space' tool. It validates the spaceId, fetches the space using the ConfluenceClient, simplifies the response, and returns it as JSON text content.
    export async function handleGetConfluenceSpace(
      client: ConfluenceClient,
      args: { spaceId: string }
    ): Promise<{
      content: Array<{ type: "text"; text: string }>;
    }> {
      try {
        if (!args.spaceId) {
          throw new McpError(ErrorCode.InvalidParams, "spaceId is required");
        }
    
        const space = await client.getConfluenceSpace(args.spaceId);
        // Transform to minimal format
        const simplified = {
          id: space.id,
          name: space.name,
          key: space.key,
          status: space.status,
          homepage: space.homepageId,
          url: space._links.webui
        };
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(simplified),
            },
          ],
        };
      } catch (error) {
        console.error("Error getting space:", error instanceof Error ? error.message : String(error));
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to get space: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • The input schema and description for the 'get_confluence_space' tool, defining the required 'spaceId' parameter.
    get_confluence_space: {
      description: "Get details about a specific space",
      inputSchema: {
        type: "object",
        properties: {
          spaceId: {
            type: "string",
            description: "ID of the space to retrieve",
          },
        },
        required: ["spaceId"],
      },
    },
  • src/index.ts:202-206 (registration)
    Registration and dispatching of the 'get_confluence_space' tool in the main server request handler switch statement, which calls the handler function.
    case "get_confluence_space": {
      const { spaceId } = (args || {}) as { spaceId: string };
      if (!spaceId) throw new McpError(ErrorCode.InvalidParams, "spaceId is required");
      return await handleGetConfluenceSpace(this.confluenceClient, { spaceId });
    }
  • The ConfluenceClient helper method that performs the actual API call to retrieve a specific space by ID.
    async getConfluenceSpace(spaceId: string): Promise<Space> {
      const response = await this.v2Client.get(`/spaces/${spaceId}`);
      return response.data;
    }
  • src/index.ts:31-31 (registration)
    Import statement registering the handler function for use in the main server.
    import { handleGetConfluenceSpace, handleListConfluenceSpaces } from "./handlers/space-handlers.js";
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves details but doesn't describe what 'details' includes, whether it requires authentication, if it's read-only, or how errors are handled. This leaves significant gaps for a tool that likely interacts with a Confluence API.

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 directly states the tool's purpose with zero wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'details' are returned, potential error conditions, or authentication requirements. For a tool that likely fetches structured data from Confluence, more context is needed to use it effectively.

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 schema description coverage is 100%, with the single parameter 'spaceId' well-documented in the schema as 'ID of the space to retrieve'. The description adds no additional parameter semantics beyond this, so it meets the baseline for high schema coverage without compensating value.

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 with a specific verb ('Get') and resource ('details about a specific space'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'list_confluence_spaces' or 'get_confluence_page', which would require more specificity about what 'details' includes.

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 space ID), contrast with 'list_confluence_spaces' for browsing spaces, or specify use cases for retrieving space details versus page details with 'get_confluence_page'.

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/aaronsb/confluence-cloud-mcp'

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