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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/geo.ts:110-120 (handler)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) }] }; }
- src/tools/geo.ts:106-109 (schema)Input schema definition for the clearGeoCache tool (no required parameters).inputSchema: { type: 'object', properties: {} },
- src/tools/geo.ts:103-121 (registration)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 };
- src/tools/geo.ts:4-4 (helper)The cache instance cleared by the clearGeoCache handler.const geoCache = new Cache<GeoLocation>(5 * 60 * 1000); // 5 minute cache