Skip to main content
Glama

jp_lit_prune_cache

Destructive

List or delete old local cache entries based on age and count. Use dry_run to preview candidates without modifying data.

Instructions

delete when dry_run=false。古いローカル cache 候補を列挙し、既定の dry_run=true では削除せず候補だけ返す。dry_run=false のときだけ older_than_days と limit に一致する cache を削除する。個別 cache_key を削除する場合は jp_lit_delete_cache、一覧確認だけなら jp_lit_list_cache を使う

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNo対象 tool cache 名。未指定なら全 tool cache を対象にする。
limitNo列挙または削除する候補の最大件数。最大 1000。
dry_runNotrue なら削除せず候補だけ返す。false のときだけ実際に古い cache を削除する。
older_than_daysNoこの日数より古い cache を prune 候補にする。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
limitYes
dry_runYes
messageYes
skippedYes
candidatesYes
total_bytesYes
pruned_countYes
matched_countYes
skipped_countYes
cutoff_saved_atYes
older_than_daysYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.14.0
    • changedInput schema / properties / tool / enum
      Previous value: -[
      -  "jp_lit_enrich_record",
      -  "jp_lit_find_authority_terms_by_classification",
      -  "jp_lit_get_fulltext",
      -  "jp_lit_get_record",
      -  "jp_lit_get_text_coordinates",
      -  "jp_lit_resolve_authority",
      -  "jp_lit_search",
      -  "jp_lit_search_fulltext",
      -  "jp_lit_search_guides_cases",
      -  "jp_lit_search_guides_manuals",
      -  "jp_lit_search_illustrations",
      -  "jp_lit_search_kaken_projects",
      -  "jp_lit_search_kokusho_fulltext",
      -  "jp_lit_search_kokusho_image_tags",
      -  "jp_lit_search_pages",
      -  "jp_lit_suggest_classification_codes"
      -]New value: +[
      +  "jp_lit_enrich_record",
      +  "jp_lit_find_authority_terms_by_classification",
      +  "jp_lit_get_fulltext",
      +  "jp_lit_get_record",
      +  "jp_lit_get_text_coordinates",
      +  "jp_lit_record_ndl_browser_search",
      +  "jp_lit_resolve_authority",
      +  "jp_lit_search",
      +  "jp_lit_search_fulltext",
      +  "jp_lit_search_guides_cases",
      +  "jp_lit_search_guides_manuals",
      +  "jp_lit_search_illustrations",
      +  "jp_lit_search_kaken_projects",
      +  "jp_lit_search_kokusho_fulltext",
      +  "jp_lit_search_kokusho_image_tags",
      +  "jp_lit_search_pages",
      +  "jp_lit_suggest_classification_codes"
      +]
  2. Changed2 schema fields changedv0.9.0
    • addedInput schema / properties / tool / enum
      Added value: +[
      +  "jp_lit_enrich_record",
      +  "jp_lit_find_authority_terms_by_classification",
      +  "jp_lit_get_fulltext",
      +  "jp_lit_get_record",
      +  "jp_lit_get_text_coordinates",
      +  "jp_lit_resolve_authority",
      +  "jp_lit_search",
      +  "jp_lit_search_fulltext",
      +  "jp_lit_search_guides_cases",
      +  "jp_lit_search_guides_manuals",
      +  "jp_lit_search_illustrations",
      +  "jp_lit_search_kaken_projects",
      +  "jp_lit_search_kokusho_fulltext",
      +  "jp_lit_search_kokusho_image_tags",
      +  "jp_lit_search_pages",
      +  "jp_lit_suggest_classification_codes"
      +]
    • removedInput schema / properties / tool / minLength
      Removed value: -1
  3. Changed4 schema fields changedv0.7.1
    • addedInput schema / properties / dry_run / description
      Added value: +"true なら削除せず候補だけ返す。false のときだけ実際に古い cache を削除する。"
    • addedInput schema / properties / limit / description
      Added value: +"列挙または削除する候補の最大件数。最大 1000。"
    • addedInput schema / properties / older_than_days / description
      Added value: +"この日数より古い cache を prune 候補にする。"
    • addedInput schema / properties / tool / description
      Added value: +"対象 tool cache 名。未指定なら全 tool cache を対象にする。"
  4. First observedv0.1.9

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, and the description goes beyond by explaining the dry_run safety mechanism: default dry_run=true returns candidates without deleting, only dry_run=false actually deletes. It also specifies the deletion condition (older_than_days and limit). No contradiction with annotations.

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?

Two sentences, front-loaded with the key action ('delete when dry_run=false'). No redundant phrases; every sentence contributes either the behavior or the alternative routing. Efficient and well-structured.

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

Completeness5/5

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

Given the output schema exists (not shown but indicated), the description covers all essential aspects for correct invocation: safety default, deletion condition, and sibling differentiation. The tool is complex enough that this description suffices without missing details.

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?

Schema coverage is 100% with each parameter described individually, but the description adds the interaction semantics: only when dry_run=false does it delete caches matching older_than_days and limit. This links parameters together in a way not obvious from the schema alone, adding value beyond the individual descriptions.

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 states a clear dual purpose: enumerate old cache candidates and optionally delete them when dry_run=false. It names the resource (local cache) and explicitly contrasts with siblings (jp_lit_delete_cache for individual deletion, jp_lit_list_cache for listing only). The verb is implied but unambiguous from context.

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

Usage Guidelines5/5

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

Explicitly tells when to use this tool versus alternatives: for bulk pruning of old caches, while jp_lit_delete_cache is for individual cache_key deletion and jp_lit_list_cache for simple listing. Also clarifies the dry_run safety default, so an agent knows the safe path is to run with dry_run=true first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.