remove_schema
Remove the existing JSON schema validation from a collection, allowing any JSON document to be stored.
Instructions
Remove JSON schema from a collection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | Collection to remove schema from |
Implementation Reference
- src/index.ts:121-123 (schema)Zod schema definition for remove_schema tool input validation. Defines a single required parameter 'collection' (string) describing which collection to remove the schema from.
const removeSchemaSchema = z.object({ collection: z.string().describe("Collection to remove schema from"), }); - src/index.ts:365-376 (registration)Tool registration entry in the tools array. Defines the tool name 'remove_schema', description 'Remove JSON schema from a collection', and links to the removeSchemaSchema for input validation. Registered with required parameter 'collection'.
{ name: "remove_schema", description: "Remove JSON schema from a collection", schema: removeSchemaSchema, inputSchema: { type: "object", properties: { collection: { type: "string", description: "Collection to remove schema from" } }, required: ["collection"] } }, - src/index.ts:1060-1078 (handler)Handler implementation for the 'remove_schema' tool case within the CallToolRequestSchema switch statement. Extracts the 'collection' argument, builds a CLI command using 'coho remove-schema' with project and space configuration, executes it via the executeCohoCommand helper, and returns the result as text content.
case "remove_schema": { const { collection } = args as RemoveSchemaArgs; const removeSchemaArgs = [ 'remove-schema', '--project', config.projectId, '--space', config.space, collection ]; const result = await executeCohoCommand(removeSchemaArgs); return { content: [ { type: "text", text: result } ], isError: false }; }