Skip to main content
Glama

model_findModelsByName

Retrieve Anki flashcard model definitions by specifying model names to access their structure and configuration.

Instructions

Gets a list of model definitions for the provided model names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNamesYesA list of model names.

Implementation Reference

  • Handler function implementing the tool logic: calls AnkiConnect's findModelsByName API with the provided modelNames list and returns the list of model definitions.
    @model_mcp.tool(
        name="findModelsByName",
        description="Gets a list of model definitions for the provided model names.",
    )
    async def find_models_by_name_tool(
        modelNames: Annotated[List[str], Field(description="A list of model names.")],
    ) -> List[Dict[str, Any]]:
        return await anki_call("findModelsByName", modelNames=modelNames)
  • Registers all model service tools under the 'model_' prefix, making 'findModelsByName' available as 'model_findModelsByName'.
    await anki_mcp.import_server("model", model_mcp)
  • Pydantic-based input schema defining modelNames as a list of strings; output as list of dicts.
        modelNames: Annotated[List[str], Field(description="A list of model names.")],
    ) -> List[Dict[str, Any]]:
  • Utility function that sends requests to AnkiConnect API and handles responses/errors.
    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 of behavioral disclosure. It states the tool 'Gets a list of model definitions,' implying a read-only operation, but doesn't specify whether it requires authentication, how it handles errors, what the return format is, or if there are rate limits. This leaves significant gaps in understanding the tool's behavior.

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, making it easy to understand quickly with zero waste.

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 for a tool that retrieves data. It doesn't explain what 'model definitions' include, the return format, or any behavioral traits like error handling. For a read operation with no structured output information, more context is needed to be fully helpful.

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 input schema has 100% description coverage, with the parameter 'modelNames' clearly documented as 'A list of model names.' The description adds no additional meaning beyond this, such as examples or constraints, so it meets the baseline for high schema coverage without compensating further.

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 a list of model definitions') and resource ('for the provided model names'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'model_modelNamesAndIds' or 'model_modelFieldNames', which also retrieve model-related information, so it lacks sibling differentiation.

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. There are no explicit instructions on when to prefer this over other model-related tools like 'model_modelNamesAndIds' or 'model_modelFieldNames', and no mention of prerequisites or exclusions, leaving usage context unclear.

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