Skip to main content
Glama

model_template_remove

Remove specific templates from models in Anki MCP by specifying the model name and template name to streamline card design updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameYesName of the model
templateNameYesName of the template to remove

Implementation Reference

  • The handler function that executes the model_template_remove tool logic: calls ankiClient.model.modelTemplateRemove with modelName and templateName, returns success message or throws error.
    async ({ modelName, templateName }) => { try { await ankiClient.model.modelTemplateRemove({ modelName, templateName, }); return { content: [ { type: 'text', text: `Successfully removed template "${templateName}" from model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to remove template "${templateName}" from model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } }
  • Zod schema for input validation of the model_template_remove tool: requires modelName and templateName as strings.
    { modelName: z.string().describe('Name of the model'), templateName: z.string().describe('Name of the template to remove'), },
  • Registration of the 'model_template_remove' tool on the MCP server, specifying name, input schema, and handler function.
    server.tool( 'model_template_remove', { modelName: z.string().describe('Name of the model'), templateName: z.string().describe('Name of the template to remove'), }, async ({ modelName, templateName }) => { try { await ankiClient.model.modelTemplateRemove({ modelName, templateName, }); return { content: [ { type: 'text', text: `Successfully removed template "${templateName}" from model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to remove template "${templateName}" from model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } } );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/arielbk/anki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server