model_field_set_description
Set or update the description of a specific field within a model in Anki MCP, using the model name, field name, and field index for precise customization.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fieldName | Yes | Name of the field | |
| index | Yes | Index of the field | |
| modelName | Yes | Name of the model |
Implementation Reference
- src/tools/model.ts:236-256 (handler)The async handler function that takes modelName, fieldName, index, calls ankiClient.model.modelFieldSetDescription, and returns a success message or throws an error.async ({ modelName, fieldName, index }) => { try { await ankiClient.model.modelFieldSetDescription({ modelName, fieldName, index, }); return { content: [ { type: 'text', text: `Successfully set description for field "${fieldName}" in model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to set description for field "${fieldName}" in model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/model.ts:231-235 (schema)Zod schema defining the input parameters: modelName (string), fieldName (string), index (number).{ modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field'), index: z.number().describe('Index of the field'), },
- src/tools/model.ts:228-257 (registration)The server.tool call that registers the 'model_field_set_description' tool with its schema and handler function.// Tool: Set field description server.tool( 'model_field_set_description', { modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field'), index: z.number().describe('Index of the field'), }, async ({ modelName, fieldName, index }) => { try { await ankiClient.model.modelFieldSetDescription({ modelName, fieldName, index, }); return { content: [ { type: 'text', text: `Successfully set description for field "${fieldName}" in model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to set description for field "${fieldName}" in model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } } );