kv_del
Delete a key-value pair from a specified keyspace. Provide the key to execute the deletion.
Instructions
Delete key-value pair in a space.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key to delete | |
| keyspace | No | Keyspace to use | |
| json | No | Output info as JSON (not table) |
Implementation Reference
- src/index.ts:163-167 (schema)Zod schema for kv_del tool input validation: requires a 'key' string, optional 'keyspace' string and 'json' boolean.
const kvDelSchema = z.object({ key: z.string().describe("Key to delete"), keyspace: z.string().optional().describe("Keyspace to use"), json: z.boolean().optional().describe("Output info as JSON (not table)"), }); - src/index.ts:462-475 (registration)Tool registration entry in the tools array defining the 'kv_del' tool with name, description, schema, and inputSchema.
{ name: "kv_del", description: "Delete key-value pair in a space.", schema: kvDelSchema, inputSchema: { type: "object", properties: { key: { type: "string", description: "Key to delete" }, keyspace: { type: "string", description: "Keyspace to use" }, json: { type: "boolean", description: "Output info as JSON (not table)" } }, required: ["key"] } }, - src/index.ts:1259-1281 (handler)Handler implementation for kv_del in the CallToolRequestSchema switch statement. Builds a 'coho del' CLI command with project, space, key, and optional keyspace/json flags, then executes it via executeCohoCommand.
case "kv_del": { const { key, keyspace, json } = args as KvDelArgs; const delArgs = [ 'del', '--project', config.projectId, '--space', config.space, key ]; if (keyspace) delArgs.push('--keyspace', keyspace); if (json) delArgs.push('--json'); const result = await executeCohoCommand(delArgs); return { content: [ { type: "text", text: result } ], isError: false }; }