Skip to main content
Glama
Nicolas-One

Redis CRUD MCP Server

by Nicolas-One

redis_exists

Check if a specified key exists in the Redis database. Returns true if the key is present, false otherwise. Use to verify data availability before performing conditional operations.

Instructions

检查键是否存在。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes

Implementation Reference

  • src/index.ts:170-170 (registration)
    Tool registration for redis_exists in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema (requires a string 'key').
    { name: "redis_exists", description: "检查键是否存在。", inputSchema: { type: "object", properties: { key: { type: "string" } }, required: ["key"] } },
  • Input schema for redis_exists: expects a single 'key' parameter of type string.
    { name: "redis_exists", description: "检查键是否存在。", inputSchema: { type: "object", properties: { key: { type: "string" } }, required: ["key"] } },
  • Handler function for redis_exists. Calls client.exists(args.key) and returns a string indicating whether the key exists.
    redis_exists: async () => { const r = await client.exists(args.key); return `EXISTS 成功。键 ${args.key} ${r > 0 ? '存在' : '不存在'}`; },
Behavior1/5

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

描述仅表明存在性检查,未说明副作用(应为只读)、返回值格式(如布尔值)或键不存在时的行为。没有注释补充,描述承担了全部披露负担但严重不足。

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?

仅一句话,无冗余信息,简洁高效,位于描述开头。虽简短但无赘语。

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

Completeness2/5

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

对于无输出模式的简单存在检查,描述未说明返回值类型或错误情况,在上下文上不完整。兄弟工具的存在暗示了操作差异,但描述未利用这一点。

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

Parameters1/5

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

输入模式只有一个键参数且无描述,描述只重复了“检查键是否存在”,未在模式之外添加任何参数含义或格式信息。模式描述覆盖率为0%,描述未补偿。

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?

描述明确说明了工具的功能是检查键是否存在,动词“检查”和资源“键”具体清晰,与兄弟工具如redis_get(获取值)和redis_del(删除)自然区分。

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

Usage Guidelines2/5

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

没有提供任何关于何时使用此工具或何时使用替代工具(如redis_get)的指导,缺乏使用场景说明。

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/Nicolas-One/redis-crud-mcp-server'

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