Skip to main content
Glama

model_field_set_font_size

Adjust the font size for a specific field within a model in Anki MCP. Specify the model name, field name, and desired font size to customize the display.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldNameYesName of the field
fontSizeYesFont size to set
modelNameYesName of the model

Implementation Reference

  • Complete registration of the MCP tool 'model_field_set_font_size', including input schema (modelName, fieldName, fontSize) and handler logic that calls AnkiConnect's modelFieldSetFontSize via ankiClient to set the font size for a model field and returns a formatted success message.
    server.tool( 'model_field_set_font_size', { modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field'), fontSize: z.number().describe('Font size to set'), }, async ({ modelName, fieldName, fontSize }) => { try { await ankiClient.model.modelFieldSetFontSize({ modelName, fieldName, fontSize, }); return { content: [ { type: 'text', text: `Successfully set font size ${fontSize} for field "${fieldName}" in model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to set font size for field "${fieldName}" in model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } } );
  • The core handler function that executes the tool logic by invoking the underlying AnkiConnect API.
    async ({ modelName, fieldName, fontSize }) => { try { await ankiClient.model.modelFieldSetFontSize({ modelName, fieldName, fontSize, }); return { content: [ { type: 'text', text: `Successfully set font size ${fontSize} for field "${fieldName}" in model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to set font size for field "${fieldName}" in model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } } );
  • Zod schema defining the input parameters for the tool.
    { modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field'), fontSize: z.number().describe('Font size to set'), },

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