Skip to main content
Glama

model_field_remove

Remove a specified field from a model within Anki MCP by providing the model name and field name, streamlining model customization and maintenance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldNameYesName of the field to remove
modelNameYesName of the model

Implementation Reference

  • The handler function that executes the model_field_remove tool. It calls the AnkiConnect modelFieldRemove method and returns a success message or throws an error.
    async ({ modelName, fieldName }) => { try { await ankiClient.model.modelFieldRemove({ modelName, fieldName, }); return { content: [ { type: 'text', text: `Successfully removed field "${fieldName}" from model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to remove field "${fieldName}" from model "${modelName}": ${error instanceof Error ? error.message : String(error)}` ); } }
  • Zod input schema defining parameters modelName and fieldName for the tool.
    { modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field to remove'), },
  • The server.tool call that registers the model_field_remove tool with its schema and handler within registerModelTools.
    'model_field_remove', { modelName: z.string().describe('Name of the model'), fieldName: z.string().describe('Name of the field to remove'), }, async ({ modelName, fieldName }) => { try { await ankiClient.model.modelFieldRemove({ modelName, fieldName, }); return { content: [ { type: 'text', text: `Successfully removed field "${fieldName}" from model "${modelName}"`, }, ], }; } catch (error) { throw new Error( `Failed to remove field "${fieldName}" from 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