Skip to main content
Glama

clearGeoCache

Clear cached geolocation data to ensure accurate location information and resolve outdated IP address mappings.

Instructions

Clear the geolocation cache

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the clearGeoCache tool. It clears the geoCache and returns a JSON confirmation message.
    handler: async () => { geoCache.clear(); return { content: [{ type: 'text', text: JSON.stringify({ message: 'Geolocation cache cleared' }, null, 2) }] }; }
  • The input schema for clearGeoCache, defining an empty object (no parameters required).
    inputSchema: { type: 'object', properties: {} },
  • The complete tool registration object for clearGeoCache, exported as part of geoTools and spread into allTools in index.ts.
    clearGeoCache: { name: 'clearGeoCache', description: 'Clear the geolocation cache', inputSchema: { type: 'object', properties: {} }, handler: async () => { geoCache.clear(); return { content: [{ type: 'text', text: JSON.stringify({ message: 'Geolocation cache cleared' }, null, 2) }] }; } }
  • The geoCache instance that is cleared by the clearGeoCache tool handler.
    const geoCache = new Cache<GeoLocation>(5 * 60 * 1000); // 5 minute cache
  • src/index.ts:28-35 (registration)
    Spreading geoTools (which includes clearGeoCache) into the allTools object used for MCP tool listing and execution.
    const allTools: ToolKit = { ...systemTools, ...networkTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };

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/cyanheads/toolkit-mcp-server'

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