Skip to main content
Glama

result-cache

Content-addressed result cache shared by your agents (short TTL) — Caches a result under the SHA-256 of the canonical (JCS) request, so every agent in your fleet that makes the same request reuses one answer for up to an hour. get returns hit with the value and age, or a miss (status unknown). Scoped to your wallet or tenantId, never shared across customers, so nobody else can poison your cache.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "op": "<op>",
      "request": "<request>"
    },
    "name": "result-cache"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes
valueNoput: the JSON result, at most 16384 bytes serialized.
requestYesAny JSON identifying the computation; it is canonicalized (RFC 8785) and hashed.
tenantIdNoRequired for API-key callers (namespaced as key:<tenantId>; keep it unguessable). Ignored when a wallet paid: the payer address is the tenant.
namespaceNoDefault: default.
ttlSecondsNoput: default 300.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses the TTL ceiling ('up to an hour'), the reuse semantics across agents in a fleet, the return shape of get (hit with value and age, or miss with unknown status), and the tenancy isolation model (wallet or tenantId, never cross-customer). Gaps remain around put behavior on an existing key (overwrite vs. no-op) and error conditions, which keeps it from a 5.

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 identity of the tool, then the security property. The parentheticals ('short TTL', 'JCS') are dense rather than decorative, and the closing 'so nobody else can poison your cache' earns its place by explaining why the isolation matters.

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 six-parameter tool with no annotations and no output schema, the description covers the critical unknowns: tenancy boundary, TTL ceiling, and the get return shape. It stops short of describing put's response or behavior when a key already exists, which is the one remaining ambiguity an agent would face.

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

Parameters3/5

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

Schema coverage is 83%, so the schema already documents tenantId scoping, the 16 KB value limit, the request canonicalization, and TTL bounds. The description reinforces the hashing of the request and the tenancy rule but adds no syntax or format detail beyond the structured fields, so baseline 3 applies.

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?

States a specific resource with its defining mechanism: a content-addressed result cache keyed on the SHA-256 of a canonical (JCS) request. It also disambiguates the two operations the single tool exposes ('Caches a result...' for put, 'get returns hit with the value and age, or a miss'), so an agent can act without opening the schema.

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

Usage Guidelines3/5

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

Usage is only implied: the 'same request reuses one answer for up to an hour' clause tells the agent the benefit of reuse, but there is no explicit when-to-use/when-not guidance, no prerequisite steps, and no routing against the cache-related siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources