Skip to main content
Glama

model_field_set_font

Set custom fonts for specific fields in Anki card models to enhance visual customization and improve readability during study sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldNameYesName of the field
fontYesFont name to set
modelNameYesName of the model

Implementation Reference

  • The handler function for the 'model_field_set_font' MCP tool. It calls the Anki client to set the font for a specific field in a model and returns a success message or throws an error.
    try { await ankiClient.model.modelFieldSetFont({ modelName, fieldName, font, }); return { content: [ { type: 'text', text: `Successfully set font "${font}" for field "${fieldName}" in model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to set font for field "${fieldName}" in model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } } );
  • Zod schema defining the input parameters for the 'model_field_set_font' tool: modelName (string), fieldName (string), font (string).
    modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field'), font: z.string().describe('Font name to set'), }, async ({ modelName, fieldName, font }) => {
  • Registration of the 'model_field_set_font' tool with the MCP server using server.tool, including schema and handler.
    'model_field_set_font', { modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field'), font: z.string().describe('Font name to set'), }, async ({ modelName, fieldName, font }) => { try { await ankiClient.model.modelFieldSetFont({ modelName, fieldName, font, }); return { content: [ { type: 'text', text: `Successfully set font "${font}" for field "${fieldName}" in model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to set font for field "${fieldName}" in 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