Skip to main content
Glama

cwiki_clear_cache

Clear cached Confluence wiki responses to force fresh data retrieval and resolve outdated content display issues.

Instructions

Clear the local Confluence response cache.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `cwiki_clear_cache` tool handler function. It is decorated with @mcp.tool() so it auto-registers. Calls cache.clear_cache() and returns the count of removed entries.
    @mcp.tool()
    def cwiki_clear_cache() -> dict[str, Any]:
        """Clear the local Confluence response cache."""
        removed = cache.clear_cache()
        return {
            "directory": str(cache.CACHE_DIR),
            "removedEntries": removed,
        }
  • The `clear_cache()` helper function that iterates over all cache entry files, deletes them, and returns the count of removed files.
    def clear_cache() -> int:
        removed = 0
        for entry in cache_entries():
            try:
                entry.unlink()
                removed += 1
            except FileNotFoundError:
                pass
        return removed
  • The `mcp` FastMCP instance used as the decorator (@mcp.tool()) to register cwiki_clear_cache as an MCP tool.
    mcp = FastMCP("apache-incubator-cwiki-mcp")
  • The MCP server imports and runs the mcp instance (which has cwiki_clear_cache registered via decorator).
    from incubator_cwiki_mcp.tools import mcp
    
    
    def main() -> None:
        try:
            mcp.run()
Behavior2/5

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

The description labels the action as destructive ('clear') without explaining side effects (e.g., performance impact, data loss, or duration). With no annotations, the burden falls entirely on the description, which falls short.

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, concise sentence that directly states the tool's function without redundancy. It is appropriately front-loaded.

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 tool has no parameters and an output schema exists, the description is structurally complete. However, the lack of behavioral context (e.g., impact of clearing cache) reduces its overall completeness for an agent.

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?

There are no parameters, so the schema coverage is 100%. The description adds no parameter details, but this is acceptable as there is nothing to explain beyond the schema.

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 uses a clear verb 'Clear' with a specific resource 'local Confluence response cache'. It successfully distinguishes from siblings like cwiki_cache_info, which implies inspection rather than mutation.

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 clear the cache, when not to, or how this compares to inspecting cache via cwiki_cache_info. The agent lacks context to decide if this action 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