redis_del
Delete a Redis key by specifying its name. Removes the key and its associated value from the database.
Instructions
删除键。
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": {
"key": "<key>"
},
"name": "redis_del"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes |
Implementation Reference
- src/index.ts:169-169 (registration)Tool 'redis_del' is registered in the ListToolsRequestSchema handler with its name, description, and input schema.
{ name: "redis_del", description: "删除键。", inputSchema: { type: "object", properties: { key: { type: "string" } }, required: ["key"] } }, - src/index.ts:189-189 (handler)Handler for 'redis_del': calls client.del(args.key) and returns a success message with the count of deleted keys.
redis_del: async () => { const r = await client.del(args.key); return `DEL 成功。删除 ${r} 个键`; }, - src/index.ts:169-169 (schema)Input schema for redis_del: requires a single 'key' (string) parameter.
{ name: "redis_del", description: "删除键。", inputSchema: { type: "object", properties: { key: { type: "string" } }, required: ["key"] } },