Redis-backed mcpg cache plugin (dev.mcpg.cache.redis)
Redis Cache Plugin demonstrates solid fundamentals: all 5 tools have clear verb-noun naming (get, put, delete, clear, incr), complete input schemas with typed parameters, and descriptions explaining what each tool does. Parameter descriptions are present and specific (e.g., 'Base64-encoded value to cache', 'Time-to-live in milliseconds'). Risk annotations (READ_ONLY, WRITE, DESTRUCTIVE) are properly declared. However, output schemas are not documented, callers cannot see what fields are returned or how to chain results. Error handling descriptions are minimal; tools mention 'Returns CacheError on backend failure' but do not guide recovery. No examples of parameter constraints (e.g., valid TTL ranges, key length limits). Descriptions average ~120 chars, which is good, but lack WHEN-to-use context and dependency hints. Tool composition is clean (each does one thing), but pagination and result limits are not addressed for the clear() operation, which could return many keys.
Clear all values in a namespace from the Redis cache using SCAN pattern matching. Returns CacheError on backend failure.
Delete a value from the Redis cache by namespace and key. Returns CacheError on backend failure.
Retrieve a value from the Redis cache by namespace and key. Returns None on miss and on backend failure per trait contract.
Atomically increment a numeric value in the Redis cache using a Lua script. Combines INCRBY and PEXPIRE in a single server-side call to prevent races with concurrent DEL operations.
Store a value in the Redis cache with optional TTL. Returns CacheError on backend failure.
Output schemas not documented. Callers cannot see what fields get(), put(), delete(), clear(), and incr() return, preventing LLMs from planning downstream operations or extracting chaining IDs.
Error handling lacks recovery guidance. Descriptions state 'Returns CacheError on backend failure' but do not tell LLMs whether to retry, ask the user, or treat as fatal. No actionable error messages.
Parameter constraints not specified. ttl_ms and delta lack min/max bounds; key and ns lack length limits or character restrictions. LLMs may pass invalid values without guidance.
clear() operation may return unbounded results via SCAN pattern matching. No pagination, limit, or result count documented. Large namespaces could exhaust context or cause timeouts.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 64 | <=2025-11-25 | v2 |
Descriptions lack WHEN-to-use context and dependency hints. E.g., incr() mentions Lua script atomicity but does not explain when to use it vs put(). No guidance on namespace scoping or key naming conventions.