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
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Clear' implies a destructive mutation, but the description doesn't specify whether this requires permissions, what 'clear' entails (e.g., deletion vs. reset), or any rate limits. It lacks details on the operation's impact or response format, leaving behavioral traits unclear.

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 with zero wasted words. It's front-loaded with the core action and resource, making it immediately clear. Every word earns its place, achieving optimal conciseness for such a simple tool.

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 simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks context on why or when to use it, behavioral details, or output expectations. For a destructive operation, more guidance would be helpful, but the low complexity keeps it from being severely incomplete.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. A baseline of 4 is given since the schema fully covers the absence of parameters, and the description doesn't need to compensate.

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 the target resource ('the geolocation cache'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'geolocate', but the verb 'Clear' versus 'geolocate' inherently suggests different operations. The description avoids tautology by not just restating the tool name.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, side effects, or relationships to sibling tools like 'geolocate' (which might populate the cache). Without any usage context, the agent must infer when clearing the cache is appropriate.

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

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