Skip to main content
Glama

cache_get

Check for a cached response before sending an expensive LLM request, matching exact model, prompt, and parameters. Return the stored answer on hit, or a miss signal to generate and save it.

Instructions

Look up a cached LLM response by exact (model, prompt, params) match, like an HTTP cache checking a request against its cache key. Call this BEFORE issuing an expensive prompt to a model. Returns hit:false on a miss or an expired entry — in that case, run the prompt yourself and store the result with cache_set. On a hit, freshness mirrors HTTP semantics: fresh means use it as-is; stale means it is past its TTL but within its stale-while-revalidate window, so you may still use it but consider refreshing it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel/tool identifier the response came from, e.g. "claude-sonnet-5"
paramsNoOther call parameters that affect the response (temperature, system prompt, etc.)
promptYesThe exact prompt or request text

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations and no output schema, the description carries the behavioral burden and does it well: it discloses exact-match semantics, the hit:false miss/expired case, and the fresh vs stale distinction. It could be slightly more explicit about the shape of a hit:true response, but the freshness semantics go beyond what the schema reveals.

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

Conciseness4/5

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

Four sentences, all of which contribute: exact-match semantics, when to call, what to do on miss, and freshness handling. It is slightly dense but not wasteful, and the most important usage directive is front-loaded.

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

Completeness4/5

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

For a cache lookup with no annotations and no output schema, the description gives the essential runtime semantics: miss behavior, expired-entry behavior, and fresh/stale handling. It could explicitly state the hit:true payload yields the cached response and mention alternatives like cache_query for non-exact lookups, but overall it is complete enough to invoke correctly.

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 already covers all three parameters with 100% coverage, so the baseline is 3. The description adds value by explaining that model, prompt, and params together form the cache key for an exact match, which connects the parameters to the tool's behavior.

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 opens with a specific verb and resource: 'Look up a cached LLM response by exact (model, prompt, params) match.' The exact-match qualifier and the HTTP cache analogy clearly define what the tool does and how it differs from sibling tools like cache_set or cache_query.

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

Usage Guidelines4/5

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

It explicitly tells the agent to call this 'BEFORE issuing an expensive prompt' and instructs what to do on a miss: run the prompt and store with cache_set. It lacks explicit comparisons to cache_query or cache_related, so it does not fully differentiate all sibling alternatives, but the core usage context is clear.

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

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/kskurtveit/echocache'

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