Skip to main content
Glama

model_template_add

Add custom templates to Anki card models, enabling users to define Front and Back content for personalized study cards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameYesName of the model
templateYesTemplate object with Front and Back content

Implementation Reference

  • Full MCP tool definition including registration, input schema (modelName: string, template: object with Front/Back), and handler function that calls ankiClient.model.modelTemplateAdd to add a card template to the specified Anki model.
    server.tool( 'model_template_add', { modelName: z.string().describe('Name of the model'), template: z .object({ Front: z.string().describe('Front template content'), Back: z.string().describe('Back template content'), }) .and(z.record(z.string())) .describe('Template object with Front and Back content'), }, async ({ modelName, template }) => { try { await ankiClient.model.modelTemplateAdd({ modelName, template, }); return { content: [ { type: 'text', text: `Successfully added template to model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to add template to 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