Skip to main content
Glama

clearGeoCache

Remove stored geolocation data from the cache to ensure accurate, up-to-date IP location information for network diagnostics and monitoring tasks.

Instructions

Clear the geolocation cache

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the clearGeoCache tool logic by calling geoCache.clear() and returning a success message.
    handler: async () => { geoCache.clear(); return { content: [{ type: 'text', text: JSON.stringify({ message: 'Geolocation cache cleared' }, null, 2) }] }; }
  • Input schema definition for the clearGeoCache tool (no required parameters).
    inputSchema: { type: 'object', properties: {} },
  • Tool definition and registration within the geoTools export.
    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) }] }; } }
  • src/index.ts:28-35 (registration)
    Inclusion of geoTools (containing clearGeoCache) into the allTools object used for MCP tool registration.
    const allTools: ToolKit = { ...systemTools, ...networkTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };
  • The cache instance cleared by the clearGeoCache handler.
    const geoCache = new Cache<GeoLocation>(5 * 60 * 1000); // 5 minute cache

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

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