drop_collection
Delete a collection from your database by specifying its name.
Instructions
Delete a collection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | Name of collection to drop |
Implementation Reference
- src/index.ts:112-114 (schema)Zod schema defining input for drop_collection: requires 'collection' (string) - the name of the collection to drop.
const dropCollectionSchema = z.object({ collection: z.string().describe("Name of collection to drop"), }); - src/index.ts:340-351 (registration)Tool definition registration in the tools array: name 'drop_collection', description 'Delete a collection', with inputSchema requiring 'collection'.
{ name: "drop_collection", description: "Delete a collection", schema: dropCollectionSchema, inputSchema: { type: "object", properties: { collection: { type: "string", description: "Name of collection to drop" } }, required: ["collection"] } }, - src/index.ts:999-1017 (handler)Handler for drop_collection tool execution. Extracts 'collection' from args, builds CLI command 'dropcollection' with project/space/collection params, and executes via coho CLI.
case "drop_collection": { const { collection } = args as DropCollectionArgs; const dropCollArgs = [ 'dropcollection', '--project', config.projectId, '--space', config.space, collection ]; const result = await executeCohoCommand(dropCollArgs); return { content: [ { type: "text", text: result } ], isError: false }; }