Skip to main content
Glama

clear-exchange-cache

Clear cached exchange instances in the CCXT MCP Server to ensure updated configurations are applied promptly for cryptocurrency exchange integrations.

Instructions

Clear exchange instance cache to apply configuration changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration and inline handler for the 'clear-exchange-cache' tool. Calls clearExchangeCache() from exchange manager and returns a success or error response.
    server.tool("clear-exchange-cache", "Clear exchange instance cache to apply configuration changes", {}, 
      async () => {
        try {
          clearExchangeCache();
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                success: true,
                message: "Exchange cache cleared successfully",
                note: "New exchange instances will be created with current configuration"
              }, null, 2)
            }]
          };
        } catch (error) {
          log(LogLevel.ERROR, `Error clearing exchange cache: ${error instanceof Error ? error.message : String(error)}`);
          return {
            content: [{
              type: "text",
              text: `Error: ${error instanceof Error ? error.message : String(error)}`
            }],
            isError: true
          };
        }
      }
    );
  • Core helper function that implements the cache clearing logic by deleting all entries from the exchanges cache object.
    export function clearExchangeCache(): void {
      Object.keys(exchanges).forEach(key => {
        delete exchanges[key];
      });
      log(LogLevel.INFO, 'Exchange cache cleared');
    }
Behavior2/5

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

With no annotations provided, the description carries full burden. It states the tool performs a destructive cache-clearing action but does not disclose behavioral traits like permissions required, side effects on system performance, whether it's reversible, or error conditions. The phrase 'to apply configuration changes' hints at a use case but lacks operational details.

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 front-loads the core action ('clear exchange instance cache') and adds value with the purpose clause ('to apply configuration changes'). There is no wasted verbiage or redundancy.

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's complexity (destructive cache operation), lack of annotations, and no output schema, the description is minimally adequate. It states what the tool does and why, but fails to provide critical behavioral context like safety warnings, expected outcomes, or error handling, leaving gaps for an agent to operate safely.

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 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, focusing instead on the tool's purpose and usage context, which aligns with the baseline for zero-parameter tools.

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 action ('clear') and target ('exchange instance cache'), with the purpose 'to apply configuration changes' providing specific context. It distinguishes from the generic 'clear-cache' sibling tool by specifying 'exchange instance' scope, though not explicitly contrasting them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when configuration changes need application, suggesting a post-configuration context. However, it lacks explicit guidance on when to use this versus 'clear-cache' or other cache-related tools, and does not mention prerequisites or exclusions.

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

Related 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/doggybee/mcp-server-ccxt'

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