Skip to main content
Glama

jp_lit_delete_cache

Delete cached search data from Japanese literature databases by cache key or tool to free storage and refresh results.

Instructions

ローカル保存されたキャッシュを cache_key 単位または tool 単位で削除する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
cache_keyYes
clear_allYes
deleted_countYes
deletedYes
messageYes

Implementation Reference

  • Handler function for jp_lit_delete_cache tool. Accepts input with tool name, optional cache_key, and optional clear_all flag. If clear_all is true, clears all cache entries for the tool; else if cache_key specified, deletes that single entry. Returns structured output with deleted count and status message.
    export function createJpLitDeleteCacheTool(cache: FileCache) {
      return async (input: unknown) => {
        const parsed = deleteCacheInputSchema.parse(input);
    
        let deletedCount = 0;
        let deleted = false;
        if (parsed.clear_all) {
          deletedCount = await cache.clear(parsed.tool);
          deleted = deletedCount > 0;
        } else if (parsed.cache_key) {
          deleted = await cache.delete(parsed.tool, parsed.cache_key);
          deletedCount = deleted ? 1 : 0;
        }
    
        const structuredContent: DeleteCacheOutput = deleteCacheOutputSchema.parse({
          tool: parsed.tool,
          cache_key: parsed.cache_key ?? null,
          clear_all: parsed.clear_all,
          deleted_count: deletedCount,
          deleted,
          message: parsed.clear_all
            ? `${parsed.tool} のキャッシュを ${deletedCount} 件削除しました`
            : deleted
              ? `cache_key=${parsed.cache_key} を削除しました`
              : `cache_key=${parsed.cache_key} は見つかりませんでした`
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(structuredContent, null, 2)
            }
          ],
          structuredContent
        };
      };
    }
Behavior2/5

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

No annotations provided, so description must disclose behavioral traits. It mentions deletion but does not state whether it is irreversible, requires specific permissions, or what side effects occur. Destructive nature is implied but not explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence is concise but fails to include critical information implied by the description (e.g., how to specify the target). Front-loads purpose but omits parameter details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no input schema and a description that mismatches schema, the tool is incomplete for an agent. No explanation of how deletion is triggered or what the output contains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions two parameters (cache_key and tool) but the input schema has zero properties. This contradiction severely undermines usability and schema-coverage is irrelevant due to mismatch.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'delete' and the resource 'locally stored cache', and specifies two units of deletion: by cache_key or by tool. This distinguishes it from sibling tools like jp_lit_prune_cache.

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?

No guidelines on when to use this tool versus alternatives like jp_lit_prune_cache. The description implies deletion but gives no context on prerequisites or suitability.

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/itarunnn/jp-lit-mcp'

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