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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

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'); }

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