Skip to main content
Glama

cwiki_space_info

Get metadata for the configured Apache Confluence space. Use force_refresh to fetch current data.

Instructions

Get metadata for the configured Apache Confluence space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
force_refreshNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration via @mcp.tool() decorator on the cwiki_space_info function.
    @mcp.tool()
    def cwiki_space_info(force_refresh: bool = False) -> dict[str, Any]:
        """Get metadata for the configured Apache Confluence space."""
        return client.confluence_get(
            f"/rest/api/space/{urllib.parse.quote(client.SPACE_KEY)}",
            force_refresh=force_refresh,
        )
  • The handler function that calls client.confluence_get with the space API endpoint.
    def cwiki_space_info(force_refresh: bool = False) -> dict[str, Any]:
        """Get metadata for the configured Apache Confluence space."""
        return client.confluence_get(
            f"/rest/api/space/{urllib.parse.quote(client.SPACE_KEY)}",
            force_refresh=force_refresh,
        )
  • The confluence_get helper function that makes or caches the HTTP request.
    def confluence_get(
        path: str,
        query: dict[str, str] | None = None,
        *,
        force_refresh: bool = False,
    ) -> dict[str, Any]:
        suffix = ""
        if query:
            suffix = "?" + urllib.parse.urlencode(query)
        request_path = f"{path}{suffix}"
    
        if not force_refresh:
            cached = cache.read_cache(request_path, BASE_URL, SPACE_KEY)
            if cached is not None:
                return cached
    
        response = confluence_request(request_path)
        cache.write_cache(request_path, response, BASE_URL, SPACE_KEY)
        return response
  • Configuration constants BASE_URL and SPACE_KEY used by the tool.
    BASE_URL = os.getenv("CWIKI_BASE_URL", "https://cwiki.apache.org/confluence").rstrip("/")
    SPACE_KEY = os.getenv("CWIKI_SPACE_KEY", "INCUBATOR")
  • Test case verifying that cwiki_space_info calls the correct API path with the configured space key.
    def test_space_info_uses_configured_space(monkeypatch: pytest.MonkeyPatch):
        calls = patch_request(monkeypatch, lambda path: {"key": "INCUBATOR", "path": path})
    
        response = tools.cwiki_space_info()
    
        assert response == {"key": "INCUBATOR", "path": "/rest/api/space/INCUBATOR"}
        assert calls == ["/rest/api/space/INCUBATOR"]
Behavior2/5

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

With no annotations, the description carries full burden. It only says 'Get metadata' (implying a read operation) but does not disclose caching behavior, side effects, or authentication needs.

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?

The description is a single sentence, making it concise and front-loaded. However, it sacrifices necessary detail for brevity.

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?

Given the low parameter count and presence of an output schema, the description is minimally adequate but lacks explanation of the parameter and clear differentiation from siblings.

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

Parameters1/5

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

The sole parameter force_refresh has no description in either the input schema (0% coverage) or the tool description, leaving its purpose and effect entirely unclear.

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 gets metadata for the configured Apache Confluence space, using a verb+resource structure. However, it does not differentiate from sibling tools like cwiki_cache_info or cwiki_list_pages, which might also return metadata aspects.

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 is provided on when to use this tool versus alternatives, nor any explanation of the force_refresh parameter or prerequisites.

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/justinmclean/CwikiMCP'

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