Skip to main content
Glama
MathMagic MCP Pro

MathMagic MCP Pro

by mrtersn9-cpu

mathmagic_run_batch

Process a JSON equation manifest within a time budget, skip completed items, save periodically, and resume via next_index. Stops on first error and relaunches MathMagic when needed.

Instructions

Process a manifest ({equations:[{id,marker,latex,size_pt?}]}, e.g. from soru-bankasi-uret-pro prepare_mathmagic.py) within a time budget; skips finished items, journals progress, relaunches MathMagic if it exits, retries an empty equation once, optional periodic save. Stops on the first error (LATEX_MISMATCH shows latex_exported). Returns next_index to continue.

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": {
      "manifest_path": "<manifest_path>"
    },
    "name": "mathmagic_run_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNooffline (default; no focus change) or plugin (plugin brings windows to front)
confirmNoMust be true to make changes
eps_dirNooffline: EPS folder
replaceNoReplace existing equations
size_ptNoPer-equation size in pt (menu sizes + 0.1 pt steps)
documentNoOpen InDesign document name (default: active document)
save_everyNoSave the document every N inserted equations (0 = never)
start_indexNo
verify_latexNooffline: LaTeX round-trip check per item
manifest_pathYesAbsolute .json path
skip_existingNoSkip markers that already have an equation (default true)
stop_on_errorNoDefault true
time_budget_sNo
remove_markersNoRemove markers after verification

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does so well: it discloses skip-finished semantics, progress journaling, auto-relaunch of MathMagic on exit, a single retry on empty equations, optional periodic saves, mutate-until-first-error behavior, and the LATEX_MISMATCH/latex_exported diagnostic. Gaps remain on permissions, what 'confirm' gates, and whether partial changes persist after an error stop.

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 input shape, then semi-colon-separated behavioral clauses. Dense but every clause carries information an agent needs; the one weak spot is the parenthetical reference to an external script, which is useful context but slightly noisy in the opening sentence.

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

Completeness4/5

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

For a 14-parameter, no-annotation, no-output-schema batch tool this is substantially complete: it explains the input artifact, resume semantics, failure handling, and return value. It could still say more about the confirm/mutation gate and the offline vs plugin mode difference, which matter for correct invocation.

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 86%, so a 3 would be baseline; the description exceeds it by documenting the manifest file's internal structure (id, marker, latex, size_pt?), which the schema only describes as 'Absolute .json path', and by explaining next_index as a resume cursor. It still adds no meaning for replace, document, eps_dir, verify_latex, or remove_markers beyond the schema text.

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?

States a specific verb and resource ('Process a manifest'), and goes further by inlining the manifest shape ({equations:[{id,marker,latex,size_pt?}]}), which immediately tells an agent what input it must prepare. It does not name or contrast with siblings such as mathmagic_prepare_offline_batch or mathmagic_preview_batch, so the boundary between 'process' and 'prepare'/'preview' is left implicit.

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?

Usage context is implied rather than stated: the mention of a time budget, skipping finished items, and returning next_index to continue makes it clear this is a resumable batch executor. However, there is no explicit when-to-use/when-not guidance versus the preview or prepare tools, and no statement of prerequisites (e.g. that confirm must be true to make changes).

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