Skip to main content
Glama

cwiki_cache_info

Check local Confluence response cache settings and current size to monitor cache usage and performance.

Instructions

Show local Confluence response cache settings and current size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The cwiki_cache_info() function that implements the tool logic. It uses cache helper functions to report cache settings and current size.
    def cwiki_cache_info() -> dict[str, Any]:
        """Show local Confluence response cache settings and current size."""
        entries = list(cache.cache_entries())
        size_bytes = sum(e.stat().st_size for e in entries if e.exists())
        return {
            "enabled": cache.cache_enabled(),
            "directory": str(cache.CACHE_DIR),
            "ttlSeconds": cache.CACHE_TTL_SECONDS,
            "entries": len(entries),
            "sizeBytes": size_bytes,
        }
  • The @mcp.tool() decorator registers cwiki_cache_info as a tool on the FastMCP instance.
    @mcp.tool()
  • cache_enabled() helper returns True if TTL > 0.
    def cache_enabled() -> bool:
        return CACHE_TTL_SECONDS > 0
  • cache_entries() helper returns list of cached JSON file paths.
    def cache_entries() -> list[Path]:
        if not CACHE_DIR.exists():
            return []
        return sorted(CACHE_DIR.glob("*.json"))
  • Cache configuration constants CACHE_TTL_SECONDS and CACHE_DIR used by the tool.
    CACHE_TTL_SECONDS = int(os.getenv("CWIKI_CACHE_TTL_SECONDS", "2592000"))
    CACHE_DIR = Path(os.getenv("CWIKI_CACHE_DIR", ".cache/cwiki")).expanduser()
Behavior3/5

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

With no annotations, the description carries the full burden. It implies read-only behavior via 'Show', but does not explicitly confirm no side effects or detail additional traits like permission requirements or performance impact.

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?

Single, front-loaded sentence with no filler. Every word contributes to meaning.

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

Completeness5/5

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

For a zero-parameter tool with an output schema, the description is sufficient. It clearly states what the tool returns (cache settings and size), and the output schema handles details.

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 coverage is 100% (no parameters). Baseline is 3; the description adds no param info, but none is needed. It does not detract from understanding.

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?

The description clearly states the tool shows cache settings and size. It uses a specific verb ('Show') and resource ('local Confluence response cache'), distinguishing it from siblings like cwiki_clear_cache.

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 vs alternatives like cwiki_clear_cache. The description does not specify context, prerequisites, or scenarios where this tool is appropriate.

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