Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Get Redis cache stats

get_redis_cache_stats
Read-only

Retrieve best-effort cache metrics for a Redis foreign data wrapper server, reporting key count, memory usage, and availability status.

Instructions

Best-effort cache metrics for a redis_fdw server. redis_fdw does not ship a uniform stats SQL surface across versions, so the tool validates that the server exists and otherwise reports available=false with a diagnostic. Operators wanting live metrics should query Redis directly (INFO / DBSIZE). Returns an object with server, available (bool), key_count, used_memory_bytes, and detail (a human-readable note).

Example: get_redis_cache_stats(server='redis_primary')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverYes
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailYes
serverYes
availableYes
key_countYes
used_memory_bytesYes
Behavior5/5

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

Annotations declare readOnlyHint=true, and the description adds significant behavioral context: the tool is best-effort due to version-dependent SQL surface, validates server existence, and returns an object with specific fields including available, key_count, etc. It also mentions the return format and provides a diagnostic note. 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?

The description is concise, front-loaded with purpose, then explains behavior, lists return fields, and provides an example. Every sentence adds value, no fluff.

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 tool's complexity (2 parameters, simple output schema), the description is complete. It covers the best-effort nature, validation, return fields, and even references list_databases for the optional parameter. The output schema exists, so return values are covered.

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 description coverage is 50% (only database has a description). The description provides an example showing the server parameter but does not elaborate on its meaning beyond the name. The database parameter's description in the schema is sufficient, but the tool description adds no extra semantics for server. The description is adequate but not compensatory beyond baseline.

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 tool gets best-effort cache metrics for a redis_fdw server, with specific verb and resource. It distinguishes from live Redis queries by noting that operators should query Redis directly for live metrics, and it appears among siblings like list_redis_foreign_servers and describe_redis_cache_table, providing enough differentiation.

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?

The description explicitly tells when to use (for cache metrics via redis_fdw) and when not to use (for live metrics, query Redis directly). It also explains the best-effort nature and the validation behavior (checks server existence, reports available=false with diagnostic). Provides an example and references list_databases for the optional parameter.

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/devopam/MCPg'

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