Skip to main content
Glama

model_modelFieldNames

Retrieve field names for a specific model in Anki flashcards using the Anki-MCP server. Input the model name to generate a structured list of fields for efficient data management and organization.

Instructions

Gets the list of field names for the provided model name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameYesThe name of the model.

Implementation Reference

  • The core handler function implementing the 'model_modelFieldNames' tool logic by invoking AnkiConnect's 'modelFieldNames' API.
    @model_mcp.tool( name="modelFieldNames", description="Gets the list of field names for the provided model name.", ) async def get_model_field_names_tool( modelName: Annotated[str, Field(description="The name of the model.")], ) -> List[str]: return await anki_call("modelFieldNames", modelName=modelName)
  • Registers all service MCPs into the main anki_mcp, specifically importing 'model' service which prefixes tools like 'modelFieldNames' to become 'model_modelFieldNames'.
    async def setup(run_server: bool = True): await anki_mcp.import_server("deck", deck_mcp) await anki_mcp.import_server("note", note_mcp) await anki_mcp.import_server("card", card_mcp) await anki_mcp.import_server("model", model_mcp) await anki_mcp.import_server("media", media_mcp) if run_server: await anki_mcp.run_async()
  • Defines the input schema (modelName: str) and output (List[str]) for the tool via Pydantic annotations in the handler.
    @model_mcp.tool( name="modelFieldNames", description="Gets the list of field names for the provided model name.", ) async def get_model_field_names_tool( modelName: Annotated[str, Field(description="The name of the model.")], ) -> List[str]: return await anki_call("modelFieldNames", modelName=modelName)

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/ujisati/anki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server