MCP server for the Hexmend Agent Gym - a spell-casting simulation environment for agent training and evaluation with graph-based spell repair and constraint preservation
Hexmend demonstrates solid tool design with clear naming conventions (verb_noun pattern), comprehensive parameter schemas with type constraints, and thoughtful composition. All 8 tools have descriptions (avg 156 chars) and input schemas with typed parameters. Tool names are action-oriented (inspect_, trace_, simulate_, explain_, set_, propose_, apply_, revert_). However, output schemas are not documented in the visible code, parameter descriptions lack actionable constraint details (e.g., format hints for IDs), and error handling guidance is minimal. The domain-specific metaphor (spells, runes, patches) is creative but risks LLM confusion without clearer mapping to underlying operations.
Apply a proposed patch to the spell graph. Returns the verification simulation result and a revert token for undoing the change.
Explain why a specific side effect occurred in the spell. Returns the causal explanation including responsible runes and the path that triggered the effect.
Inspect a spell graph, optionally filtering to specific runes. Returns the graph structure, nodes, edges, boundary edges, and current scenario state including simulation results.
Propose patches to repair the spell. Returns multiple candidate patches with their predicted outcomes, operation ledgers, and review summaries.
Revert the most recently applied patch using its revert token. Restores the graph to its state before the patch was applied.
Set a constraint that must be preserved during spell repair. The constraint is a human-readable statement about what must remain unchanged.
Output schemas not documented. Tool descriptions state what is returned (e.g., 'Returns the graph structure, nodes, edges...') but no formal schema is visible in source code. LLMs cannot plan downstream calls or extract specific fields without knowing the response structure.
Parameter descriptions lack actionable constraint details. E.g., 'nodeIds' says 'Optional array of rune IDs' but does not explain what a valid rune ID looks like (format, length, character set). 'patchId' and 'sideEffectId' similarly lack format hints. LLMs cannot validate inputs without explicit constraints.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 65 | 2025-06-18+ | v2 |
Simulate casting the spell, optionally with a proposed patch applied. Returns the simulation result including success status, side effects, and trace information.
Trace causal paths from a source rune to an effect or from an effect backward to sources. Returns ordered paths, cycles, and type violations in the spell graph.
Domain metaphor (spells, runes, patches, sacred constraints) is creative but opaque. Without a glossary or mapping to underlying operations, LLMs may misunderstand when to call these tools. E.g., is 'spell' a project, a workflow, or a configuration? Is 'rune' a node, a component, or a variable?
Error handling guidance absent. Tool descriptions do not explain what errors are possible, when they occur, or how to recover. E.g., what happens if a patchId is invalid? If a constraint cannot be satisfied? LLMs need recovery hints.
Mutual exclusivity not documented. trace_effect has 'effectId' and 'sourceId' marked as mutually exclusive in the description, but other tools with optional parameters (e.g., simulate_cast's optional patchId) do not clarify whether omitting it has a default behavior or is an error.