Skip to main content
Glama

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
NameRequiredDescriptionDefault
fieldNameYesName of the field
indexYesIndex of the field
modelNameYesName of the model

Implementation Reference

  • 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)}` ); } }
  • 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'), },
  • 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)}` ); } } );

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