Skip to main content
Glama

model_modelFieldAdd

Add a custom field to an existing Anki flashcard model to organize and customize your study material.

Instructions

Adds a new field to an existing model.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameYesName of the model to modify.
fieldNameYesName of the new field to add.
indexNoOptional 0-based index to insert the field at.

Implementation Reference

  • The handler function `add_model_field_tool` that executes the tool logic by preparing parameters and calling `anki_call('modelFieldAdd', **params)`.
    async def add_model_field_tool(                                                     
        modelName: Annotated[str, Field(description="Name of the model to modify.")],
        fieldName: Annotated[str, Field(description="Name of the new field to add.")],
        index: Annotated[
            Optional[int],
            Field(description="Optional 0-based index to insert the field at."),
        ] = None,
    ) -> None:
        params: Dict[str, Any] = {"modelName": modelName, "fieldName": fieldName}
        if index is not None:
            params["index"] = index
        return await anki_call("modelFieldAdd", **params)
  • Registers the tool named 'modelFieldAdd' on the `model_mcp` FastMCP instance.
    @model_mcp.tool(
        name="modelFieldAdd", description="Adds a new field to an existing model."
    )
    async def add_model_field_tool(                                                     
        modelName: Annotated[str, Field(description="Name of the model to modify.")],
        fieldName: Annotated[str, Field(description="Name of the new field to add.")],
        index: Annotated[
            Optional[int],
            Field(description="Optional 0-based index to insert the field at."),
        ] = None,
    ) -> None:
        params: Dict[str, Any] = {"modelName": modelName, "fieldName": fieldName}
        if index is not None:
            params["index"] = index
        return await anki_call("modelFieldAdd", **params)
  • Registers the `model_mcp` tools under the 'model' prefix in the main `anki_mcp`, resulting in tool name 'model_modelFieldAdd'.
    await anki_mcp.import_server("model", model_mcp)
  • Pydantic schema definitions for the tool inputs using Annotated and Field.
        modelName: Annotated[str, Field(description="Name of the model to modify.")],
        fieldName: Annotated[str, Field(description="Name of the new field to add.")],
        index: Annotated[
            Optional[int],
            Field(description="Optional 0-based index to insert the field at."),
        ] = None,
    ) -> None:
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 of behavioral disclosure. It states the tool adds a field but lacks critical details: whether this is a destructive mutation, what permissions are required, if there are rate limits, what happens on duplicate field names, or the response format. This is inadequate for a mutation tool with zero annotation coverage.

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's front-loaded and wastes no space, earning a perfect score for conciseness.

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 complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain behavioral aspects like error conditions, side effects, or return values, leaving significant gaps for an AI agent to understand how to invoke it correctly.

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?

Schema description coverage is 100%, so the schema already documents all three parameters (modelName, fieldName, index) with descriptions. The description adds no additional meaning beyond what's in the schema, such as format constraints or practical examples, meeting the baseline of 3 when schema does the heavy lifting.

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 ('Adds') and the target resource ('a new field to an existing model'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'model_modelFieldRemove' or 'model_createModel', which would require explicit comparison for a score of 5.

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 doesn't mention prerequisites (e.g., model must exist), exclusions (e.g., cannot add duplicate fields), or refer to sibling tools like 'model_modelFieldRemove' for field deletion or 'model_createModel' for model creation.

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