Skip to main content
Glama

model_field_add

Add a custom field to a specified model at a defined position using Anki MCP. Enhance model structure by inserting fields where needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldNameYesName of the field to add
indexYesPosition to insert the field (0-based)
modelNameYesName of the model

Implementation Reference

  • Full MCP tool definition including registration, input schema (Zod), and handler function that executes modelFieldAdd via ankiClient and returns success/error response.
    server.tool( 'model_field_add', { modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field to add'), index: z.number().describe('Position to insert the field (0-based)'), }, async ({ modelName, fieldName, index }) => { try { await ankiClient.model.modelFieldAdd({ modelName, fieldName, index, }); return { content: [ { type: 'text', text: `Successfully added field "${fieldName}" to model "${modelName}" at position ${index}`, }, ], }; } catch (error) { throw new Error( `Failed to add field "${fieldName}" 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