Skip to main content
Glama

deck_getDeckConfig

Retrieve configuration settings for a specific Anki flashcard deck to manage study parameters and review options.

Instructions

Gets the configuration group object for the given deck name. Returns the deck configuration object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deckYesThe name of the deck (e.g., 'Default').

Implementation Reference

  • The main handler function for the 'deck_getDeckConfig' tool. It takes a deck name, calls the AnkiConnect 'getDeckConfig' API via anki_call, and returns the config. The @tool decorator registers it with name 'getDeckConfig' to deck_mcp; prefixed to 'deck_getDeckConfig' on import.
    @deck_mcp.tool(
        name="getDeckConfig",
        description="Gets the configuration group object for the given deck name. Returns the deck configuration object.",
    )
    async def get_deck_config_tool(
        deck: Annotated[str, Field(description="The name of the deck (e.g., 'Default').")],
    ) -> Dict[str, Any]:
        return await anki_call("getDeckConfig", deck=deck)
  • Registers all tools from deck_mcp (including getDeckConfig) into the main anki_mcp server with the 'deck_' prefix, resulting in the tool name 'deck_getDeckConfig'.
    await anki_mcp.import_server("deck", deck_mcp)
  • Pydantic schema definition for the input parameter 'deck' using Annotated and Field.
    deck: Annotated[str, Field(description="The name of the deck (e.g., 'Default').")],
  • Helper function that performs the HTTP POST to AnkiConnect API, handles errors, and returns the result. Used by the tool handler.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Gets'), but doesn't mention potential errors (e.g., if the deck doesn't exist), authentication requirements, rate limits, or what the returned configuration object contains, leaving significant gaps for a tool that fetches data.

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

Conciseness4/5

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

The description is appropriately concise with two sentences that directly state the tool's function and return value. However, the second sentence ('Returns the deck configuration object.') is somewhat redundant with the first, slightly reducing efficiency, but overall it's well-structured and front-loaded.

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 configuration retrieval tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the configuration object contains, potential error conditions, or how it integrates with sibling tools, making it inadequate for full contextual understanding.

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 schema description coverage is 100%, with the parameter 'deck' fully documented in the schema. The description adds no additional meaning beyond what the schema provides (e.g., it doesn't clarify if 'deck' refers to a user-defined name or system default), so it meets the baseline score of 3 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 verb ('Gets') and resource ('configuration group object for the given deck name'), making the purpose understandable. However, it doesn't explicitly distinguish this from sibling tools like 'deck_deckNames' (which lists decks) or 'deck_saveDeckConfig' (which modifies configurations), missing full 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. For example, it doesn't mention if this should be used before modifying deck configurations with 'deck_saveDeckConfig' or in conjunction with 'deck_deckNames' to verify deck existence, leaving usage context implied at best.

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