mirror of
https://github.com/moeru-ai/airi.git
synced 2026-08-14 00:48:06 +00:00
4.4 KiB
4.4 KiB
name, description
| name | description |
|---|---|
| minecraft-debug-mcp | Operate and debug the live Minecraft bot through its built-in MCP REPL server. Use when work requires starting the bot with `pnpm dev`, connecting to the local MCP endpoint, inspecting cognitive state/logs/history, injecting synthetic chat/events, or running targeted REPL code against the running brain during investigation and development. |
Minecraft Debug MCP
Overview
Use this skill to run the local bot and interact with its MCP debug interface safely and quickly.
Quick Start Workflow
- Run
pnpm devfrom/path/to/project/root/integrations/minecraftand keep it running. - Wait for
MCP REPL server running at http://localhost:3001in logs. - Connect MCP client to
http://localhost:3001/sse. - Verify readiness with a read-only call:
- Read resource
brain://state, or - Call tool
get_state.
- Read resource
- Continue with the smallest tool/action that answers the task.
Execution Rules
- Start read-only, then escalate to mutation tools only when needed.
- Prefer
get_state,get_last_prompt, andget_logsfor diagnostics beforeexecute_repl. - Prefer
get_llm_tracefor structured per-attempt reasoning/content inspection. - Keep
execute_replsnippets minimal and reversible. - Use
inject_chatfor conversational simulation andinject_eventonly when specific event-shape testing is required. - Treat
inject_chatas side-effectful: it can trigger actual in-game bot replies/actions. - If MCP connection fails, check that
pnpm devis still running and port3001is free.
Tooling Strategy
- Use
get_stateto inspect queue/processing state and available tools/actions (skips REPL builtins by default; pass{ includeBuiltins: true }to include them). - Use
get_logswith a smalllimitfirst. - Use
get_last_promptto inspect latest LLM input. - Use
execute_replfor deep object inspection or one-off targeted calls on the running brain. - Use
inject_chatto simulate player chat and verify behavior loop. - Use
get_llm_traceto assert REPL behavior in automation (for example, detect repeatedawait skip()on specific events). - Use
execute_repl("forget_conversation()")to clear conversation memory before prompt-engineering tests.
Read references/mcp-surface.md for exact tool/resource names and argument schemas.
Live-Tested Notes
get_statereturns available tools/actions and runtime state (skips REPL builtins likeskip,use,logby default to reduce noise; pass{ includeBuiltins: true }if you need to inspect them).get_last_promptcan return very large payloads; call only when prompt-level debugging is needed.execute_replreturns a structured result wherereturnValueis stringified; parse mentally as display output, not typed JSON.get_logs(limit=10)is enough to verify whether an injected event reached REPL/executor.get_llm_trace(limit, turnId?)gives structured attempt-level trace data (messages, content, reasoning, usage, duration).get_last_promptandget_llm_traceare compacted for MCP: system prompt/system-role messages are omitted to reduce token cost.- Prefer compact value reads in REPL:
query.self()for bot status.query.inventory().has(name, n)/query.inventory().count(name)for checks.query.inventory().summary()for stable aggregated item output.query.snapshot(range?)for one-shot world+inventory capture.
forget_conversation()is available as a runtime function in REPL/global context and clears only conversation memory.- Current prompt behavior supports two-turn value-first flows: read/query turn returns concrete data first, follow-up turn performs chat/action using that returned value.
Live Testing Workflow
- Confirm MCP health:
- Call
get_state.
- Call
- Capture baseline inventory:
execute_replwithquery.inventory().list().map(i => ({ name: i.name, count: i.count })).
- Trigger a task through normal cognition path:
- Call
inject_chatwith a clear instruction (example: "please gather 3 dirt blocks").
- Call
- Verify execution trace:
- Call
get_logs(limit=10)and check for:- bot acknowledgement chat
- action tool feedback (for example
collectBlocks) - REPL result summary
- Call
get_llm_trace(limit=5)when you need exact model output/reasoning for assertions.
- Call
- Re-check inventory using the same REPL snippet and compare against baseline.
Use this workflow when validating behavior changes, tool wiring, or regressions in planning/execution loops.