delete_glossary
Remove a glossary from your Lara Translate account using its unique ID. Permanently delete glossaries to manage your translation resources.
Instructions
Deletes a glossary from your Lara Translate account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The glossary ID to delete (format: gls_*, e.g., 'gls_xyz123') |
Implementation Reference
- src/mcp/tools/delete_glossary.ts:12-16 (handler)The actual handler function for the delete_glossary tool. Validates args using deleteGlossarySchema and calls lara.glossaries.delete(id).
export async function deleteGlossary(args: any, lara: Translator) { const validatedArgs = deleteGlossarySchema.parse(args); const { id } = validatedArgs; return await lara.glossaries.delete(id); } - Zod schema for delete_glossary input validation. Requires a string 'id' matching the pattern /^gls_[a-zA-Z0-9_-]+$/ with length 1-255.
export const deleteGlossarySchema = z.object({ id: z.string() .min(1) .max(255) .regex(/^gls_[a-zA-Z0-9_-]+$/, "Invalid glossary ID format") .describe("The glossary ID to delete (format: gls_*, e.g., 'gls_xyz123')"), }); - src/mcp/tools.ts:48-68 (registration)Registration of delete_glossary in the handlers map at line 61, mapping the tool name to the deleteGlossary function.
const handlers: Record<string, Handler> = { detect_language: detectLanguage, translate: translateHandler, create_memory: createMemory, delete_memory: deleteMemory, update_memory: updateMemory, add_translation: addTranslation, delete_translation: deleteTranslation, import_tmx: importTmx, check_import_status: checkImportStatus, get_glossary: getGlossary, create_glossary: createGlossary, update_glossary: updateGlossary, delete_glossary: deleteGlossary, import_glossary_csv: importGlossaryCsv, check_glossary_import_status: checkGlossaryImportStatus, export_glossary: exportGlossary, get_glossary_counts: getGlossaryCounts, add_glossary_entry: addGlossaryEntry, delete_glossary_entry: deleteGlossaryEntry, }; - src/mcp/tools.ts:389-400 (registration)Tool definition for delete_glossary with name, description, inputSchema, and annotations (destructiveHint: true).
{ name: "delete_glossary", description: "Deletes a glossary from your Lara Translate account.", inputSchema: z.toJSONSchema(deleteGlossarySchema), annotations: { title: "Delete glossary", readOnlyHint: false, destructiveHint: true, openWorldHint: false, }, }, - src/mcp/tools.ts:125-126 (registration)Human-readable response formatting for delete_glossary results.
case "delete_glossary": return `Deleted glossary ${result?.id ?? args?.id ?? ""}`;