Skip to main content
Glama

model_modelStyling

Retrieve CSS styling for Anki flashcard models to customize appearance and formatting of card templates.

Instructions

Gets the CSS styling for the provided model name. Returns an object containing the 'css' field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameYesThe name of the model.

Implementation Reference

  • Handler and schema definition for the 'modelStyling' tool (prefixed to 'model_modelStyling'), retrieves model CSS styling via AnkiConnect.
    @model_mcp.tool(
        name="modelStyling",
        description="Gets the CSS styling for the provided model name. Returns an object containing the 'css' field.",
    )
    async def get_model_styling_tool(
        modelName: Annotated[str, Field(description="The name of the model.")],
    ) -> Dict[str, Any]:                         
        return await anki_call("modelStyling", modelName=modelName)
  • Top-level registration of model service tools with 'model_' prefix into main Anki MCP server.
    await anki_mcp.import_server("model", model_mcp)
  • Shared helper function used by the tool handler to invoke AnkiConnect API actions.
    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' CSS styling and returns an object with a 'css' field, which implies a read-only operation. However, it lacks details on permissions, error handling (e.g., if the model doesn't exist), rate limits, or whether the CSS is editable. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 concise and front-loaded, consisting of two clear sentences: one stating the tool's purpose and another specifying the return value. There is no wasted language, and every sentence adds value by explaining what the tool does and what it returns.

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

Completeness3/5

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

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is moderately complete. It covers the basic purpose and return format but lacks details on behavioral aspects like error handling or usage context. Without annotations or an output schema, more guidance would improve completeness, but it's adequate for a simple retrieval tool.

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 'modelName' documented as 'The name of the model.' The description adds no additional meaning beyond this, such as format examples or constraints. With high schema coverage, the baseline score is 3, as the schema already provides adequate parameter information.

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 tool's purpose: 'Gets the CSS styling for the provided model name.' It specifies the verb ('Gets') and resource ('CSS styling'), and distinguishes it from siblings like model_updateModelStyling (which modifies styling) and model_findModelsByName (which searches models). However, it doesn't explicitly contrast with all siblings, such as model_modelTemplates, which might relate to styling but isn't directly addressed.

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., needing an existing model), exclusions, or comparisons to siblings like model_modelTemplates or model_updateModelStyling. The context is implied (retrieving styling for a model), but explicit usage instructions are absent.

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