Skip to main content
Glama
anki-workflow-mcp

anki-workflow-mcp

by Gugart43

Batch Auto Fix

batch_auto_fix

Repairs and sanitizes an entire draft CSV block for Anki: fixes unescaped pipes, newlines, clinical inequalities, bare ampersands, markdown, and unclosed tags, then returns the corrected CSV with applied fixes and residual diagnostics.

Instructions

Automatically repair and sanitize an entire draft CSV block (QA or Cloze). Enforces canonical header, repairs unescaped pipes and newlines in long free-text fields, escapes clinical inequalities (< 10, > 50) and bare '&', converts basic markdown, and auto-closes simple unclosed tags. Returns fixed_csv, fixes_applied, and residual diagnostics.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "csv_text": "<csv_text>",
      "note_type": "<note_type>"
    },
    "name": "batch_auto_fix"
  }
}

Input Schema

NameRequiredDescriptionDefault
csv_textYes
note_typeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose a lot: the exact repair classes performed and the fact that fixes are best-effort, since 'residual diagnostics' are returned alongside fixed_csv and fixes_applied. What is missing is whether the input is mutated or only a corrected copy is returned, whether the operation is deterministic/idempotent, and what happens when a block cannot be repaired.

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?

Front-loaded with the action and target, followed by a compact enumeration of repairs and the returned fields; there is no filler. The single dense sentence with a long clause list is slightly hard to scan, but every clause names a distinct repair the agent would otherwise have to discover.

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

Completeness5/5

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

For a two-parameter transform tool with an output schema already documenting return values, the description covers the action, the scope, the concrete repair policy, and the possibility of leftover issues. Nothing essential to calling it correctly is missing.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it does the most important thing: it establishes that csv_text is an entire draft CSV block rather than a path or row, and that note_type selects QA versus Cloze repair rules. It still does not say how the QA and Cloze modes differ in behavior, which is a residual gap for the enum parameter.

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?

Names a specific verb set (repair/sanitize) and a specific resource (an entire draft CSV block, QA or Cloze), and enumerates the concrete transformations performed, so the agent knows exactly what class of work this does. It does not explicitly distinguish itself from validate_batch or batch_patch_draft, which keeps it below a 5.

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

Usage Guidelines3/5

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

The phrase 'draft CSV block' implies this runs on a whole block during drafting, before final export, which gives partial usage context. However, there is no explicit statement of when to call this instead of validate_batch (diagnose only) or batch_patch_draft (targeted edits), and no prerequisites or exclusions are stated.

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