Skip to main content
Glama

model_modelFieldNames

Retrieve field names for a specific Anki flashcard model to understand its structure and customize content 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

  • Handler implementation for the 'modelFieldNames' tool (prefixed to 'model_modelFieldNames' in main server). Takes modelName and calls AnkiConnect API via anki_call to retrieve field names.
    @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)
  • Input schema (modelName: str) and output type (List[str]) for the tool.
        modelName: Annotated[str, Field(description="The name of the model.")],
    ) -> List[str]:
  • Main registration step that imports model_mcp tools with 'model_' prefix, creating 'model_modelFieldNames'.
    await anki_mcp.import_server("model", model_mcp)
  • Local registration of the tool on the model_mcp FastMCP instance.
    @model_mcp.tool(
        name="modelFieldNames",
        description="Gets the list of field names for the provided model name.",
    )
  • Helper function used by the handler to make API calls to AnkiConnect server.
    async def anki_call(action: str, **params: Any) -> Any:
        async with httpx.AsyncClient() as client:
            payload = {"action": action, "version": 6, "params": params}
            result = await client.post(ANKICONNECT_URL, json=payload)
            result.raise_for_status()                                      
            result_json = result.json()
            error = result_json.get("error")
            if error:
                raise Exception(f"AnkiConnect error for action '{action}': {error}")
            response = result_json.get("result")
                                                                 
                                                                                                         
                                                                                            
            if "result" in result_json:
                return response
            return result_json                                                                        
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool 'Gets' data, implying a read-only operation, but does not disclose behavioral traits like error handling (e.g., if the model name is invalid), return format, or any rate limits. This leaves gaps in understanding how the tool behaves in practice.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for its simple function, with no wasted information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not explain what the returned 'list of field names' looks like (e.g., format, ordering) or address potential errors, which is insufficient for a tool with no structured output documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds minimal semantic context by specifying that the parameter is for 'the provided model name,' which aligns with the schema's 100% coverage. Since the schema already fully describes the 'modelName' parameter, the description does not provide additional value beyond what is structured, meeting the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Gets') and resource ('list of field names for the provided model name'), making the purpose immediately understandable. However, it does not distinguish this tool from sibling tools like 'model_modelNamesAndIds' or 'model_findModelsByName', which reduces its differentiation value.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It lacks context about prerequisites, such as whether the model must exist, and does not mention related tools like 'model_modelFieldAdd' or 'model_modelFieldRemove' for field management.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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