delete_glossary_entry
Delete a glossary entry from your Lara Translate account by specifying the glossary ID and either a term (monodirectional) or GUID (multidirectional).
Instructions
Deletes an entry from a glossary in your Lara Translate account. Use term for monodirectional glossaries or guid for multidirectional glossaries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The glossary ID (format: gls_*, e.g., 'gls_xyz123') | |
| term | No | The term to delete. Use this for monodirectional glossaries. | |
| guid | No | The entry GUID to delete. Use this for multidirectional glossaries. |
Implementation Reference
- The main handler function that parses args (id, term, guid) using Zod schema and calls lara.glossaries.deleteEntry().
export async function deleteGlossaryEntry(args: unknown, lara: Translator) { const { id, term, guid } = deleteGlossaryEntrySchema.parse(args); if (!term && !guid) { throw new InvalidInputError("At least one of 'term' or 'guid' must be provided"); } return await lara.glossaries.deleteEntry(id, term, guid); } - Zod schema defining input validation: id (required, gls_* format), term (optional object with language and value), guid (optional string).
export const deleteGlossaryEntrySchema = z.object({ id: z.string() .min(1) .max(255) .regex(/^gls_[a-zA-Z0-9_-]+$/, "Invalid glossary ID format") .describe("The glossary ID (format: gls_*, e.g., 'gls_xyz123')"), term: z.object({ language: z.string().describe("The language code of the term"), value: z.string().describe("The term value"), }).optional().describe("The term to delete. Use this for monodirectional glossaries."), guid: z.string().optional().describe( "The entry GUID to delete. Use this for multidirectional glossaries." ), }); - src/mcp/tools.ts:67-67 (registration)Registration of the handler function in the handlers record under the key 'delete_glossary_entry'.
delete_glossary_entry: deleteGlossaryEntry, - src/mcp/tools.ts:464-468 (registration)Tool metadata (name, description, inputSchema, annotations) registered in the tool list for MCP discovery.
{ name: "delete_glossary_entry", description: "Deletes an entry from a glossary in your Lara Translate account. Use term for monodirectional glossaries or guid for multidirectional glossaries.", inputSchema: z.toJSONSchema(deleteGlossaryEntrySchema), - src/mcp/tools.ts:129-130 (registration)Case in the result description switch statement for the 'delete_glossary_entry' action.
case "delete_glossary_entry": return "Deleted entry from glossary";