Skip to main content
Glama

sodax_refresh_cache

Idempotent

Clear cached API data to ensure fresh fetches on next requests, removing stale responses.

Instructions

Clear the cached API data to force fresh fetches on next requests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool registration for 'sodax_refresh_cache' with the handler function that calls getCacheStats() and clearCache() to clear the API cache and return the count of removed entries.
    server.tool(
      "sodax_refresh_cache",
      "Clear the cached API data to force fresh fetches on next requests",
      {},
      { readOnlyHint: false, destructiveHint: false, idempotentHint: true },
      async () => {
        const statsBefore = getCacheStats();
        clearCache();
        return {
          content: [{
            type: "text",
            text: `Cache cleared. ${statsBefore.size} cached entries removed.`
          }]
        };
      }
    );
  • src/index.ts:263-264 (registration)
    Registration of 'sodax_refresh_cache' in the 'partnersAndToken' group in the tool listing endpoint at /api.
      "sodax_refresh_cache"
    ],
  • The clearCache() helper function that clears the in-memory cache Map.
    export function clearCache(): void {
      cache.clear();
    }
  • The getCacheStats() helper function that returns cache size and keys.
    export function getCacheStats(): { size: number; keys: string[] } {
      return {
        size: cache.size,
        keys: Array.from(cache.keys())
      };
    }
  • Analytics tracking entry mapping 'sodax_refresh_cache' to the 'api' group.
    sodax_refresh_cache: "api",
Behavior3/5

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

Annotations already indicate the tool is idempotent and non-destructive. The description adds that it clears cache and forces fresh fetches, which is consistent. However, it does not disclose potential side effects, such as whether it clears cache globally or for the current client only.

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, short sentence (10 words) that conveys the entire purpose. It is front-loaded and contains no filler or redundant information.

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 simple tool with no parameters and no output schema, the description fully explains what the tool does and its effect on subsequent requests. No additional context is necessary given the annotations and context signals.

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?

The tool has zero parameters and the input schema has 100% coverage. The description adds no parameter details, but none are needed. The absence of parameters is correctly implied by the schema, and the description does not mislead.

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's action ('Clear the cached API data') and its purpose ('to force fresh fetches on next requests'). It is distinct from its sibling tools, which are all read-only 'get' operations, making this the only cache-refresh tool.

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 explicit guidance is given on when to use this tool versus alternatives. While it is implied that one should run this before get operations to obtain fresh data, the description does not state this, nor does it mention when not to use it or provide alternative approaches.

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/gosodax/builders-sodax-mcp-server'

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