Skip to main content
Glama
deanxizian

balatro-codex-mcp

by deanxizian

balatro-codex-mcp

balatro-codex-mcp 让 Codex 桌面端通过本地 STDIO MCP 工具控制 Steam 版 《Balatro / 小丑牌》。Python Server 只暴露经过约束的正常游戏动作,不向 Codex 提供任意 JSON-RPC、调试、作弊、存档读写、截图或返回菜单能力。

项目基于:

2026-09-06 升级验证

  • MCP SDK 和 mcp-types 已升级并锁定为 2.1.1,保留官方 MCPServer 与 STDIO 入口。

  • macOS 已验证 Steamodded 26.829.0 与 BalatroBot v1.5.2、Lovely 0.9.0 的启动及只读连接兼容性。

  • 验证涵盖 healthrpc.discovergamestate 和 MCP tools/list;升级验收未执行 游戏动作,完整对局及无尽模式仍需实际游玩验证。

  • 启动脚本将 localhost127.0.0.1::1 加入启动进程的 NO_PROXY / no_proxy, 保留已有绕过规则,避免 macOS 系统代理向健康检查返回 HTML 而触发 JSONDecodeError。 此设置不修改系统代理或 BalatroBot 上游源码。

  • 升级 Steamodded 前应将旧目录备份到 Mods 以外的位置,避免同时加载两份 Mod。 本机升级备份位于 ~/Library/Application Support/balatro-codex-mcp/backups/

  • BalatroBot 保留稳定版。无尽模式弹窗修复 PR #200 目前只在 dev;该分支还要求专用配置档并自动全解锁,本项目不默认切换。

架构

Codex 桌面端
  ↓ STDIO MCP(唯一游戏控制入口)
本项目的 Python MCP Server
  ↓ HTTP JSON-RPC 2.0(默认 http://127.0.0.1:12346)
BalatroBot
  ↓ 游戏内 Mod API
Steam 版 Balatro

MCP Server 和 BalatroBot 使用独立生命周期。Codex 启动 MCP Server 时,Server 会尽力读取 rpc.discover,但绝不会启动、关闭、重置游戏或加载存档;即使 BalatroBot 离线,MCP 初始化和 tools/list 仍会成功,balatro_health 会返回 可执行的修复命令。

为什么 Codex 桌面端使用 MCP

MCP 把参数类型、工具说明、只读/写入提示和 server-level instructions 一起交给 Codex。模型调用 balatro_play_cards(cards=[...], expected_state_token="..."), 而不是通过 Shell 拼接 BalatroBot JSON。这样可以集中执行:

  • 0-based 索引和完整排列校验

  • state_token 乐观并发保护

  • 写锁内二次状态校验

  • 写操作禁止自动重试

  • 工具白名单和危险接口隔离

  • stdout 仅承载 MCP 协议,诊断日志只写 stderr

Related MCP server: desmume_webassembly_harness

Balatro、Lovely、Steamodded 与 BalatroBot

  • Balatro 是 Steam 游戏本体。

  • Lovely Injector 把 Mod 加载能力注入 Balatro 的 LÖVE 运行时。

  • Steamodded 是 Balatro 的 Mod loader/API。

  • BalatroBot 是运行在游戏内的 Mod,并在本机提供 HTTP JSON-RPC 2.0。

  • 本项目 不重写或修改 BalatroBot,只把它的正常游戏 API 收窄为 Codex MCP 工具。

安装 Mod 时遵循 BalatroBot 安装文档Lovely 文档Steamodded 文档。本项目脚本不会复制、 删除或修改游戏、Mod 和存档文件。

前置条件

  • macOS 与 Steam 版 Balatro 1.0.1+

  • Lovely 0.8.0+

  • Steamodded 1.0.0-beta-1221a+

  • BalatroBot Mod v1.5.2

  • Python 3.13+(项目 .python-version 固定 3.13 系列)

  • uv

  • Codex 桌面端;建议同时有 Codex CLI

BalatroBot 当前常见路径:

游戏:
~/Library/Application Support/Steam/steamapps/common/Balatro/Balatro.app

Lovely:
~/Library/Application Support/Steam/steamapps/common/Balatro/liblovely.dylib

Mods:
~/Library/Application Support/Balatro/Mods

BalatroBot:
~/Library/Application Support/Balatro/Mods/balatrobot

Quick Start

在项目根目录:

uv sync
./scripts/doctor_macos.sh
./scripts/start_balatro_macos.sh --fast

启动脚本在前台运行 BalatroBot v1.5.2,默认显示游戏窗口。不要关闭这个终端; Ctrl+C 会直接转发给 BalatroBot。--fast 可省略,也可以追加任何 balatrobot serve 参数,例如 --no-shaders。脚本不会后台运行、不会杀死占用端口 的进程,也不会重置游戏或存档。

打开另一个终端:

./scripts/verify_connection.sh
./scripts/configure_codex_mcp.sh

然后:

  1. 重启 Codex 桌面端。

  2. 打开本项目。

  3. 在对话框输入 /mcp

  4. 确认 balatro 已连接。

  5. 输入下文“推荐游戏提示词”。

如果 doctor_macos.sh 报告 Mod 或游戏缺失,先按上游文档补齐;该脚本是只读检查, 不会自动安装或修改系统。

安装 Python 项目

uv sync

该命令创建项目私有环境并生成/使用 uv.lock。完成后,真正交给 Codex 的入口是:

<仓库绝对路径>/.venv/bin/balatro-codex-mcp

可以直接验证入口存在:

test -x .venv/bin/balatro-codex-mcp

不用 uv run 启动 Codex MCP 的原因是:macOS GUI 进程未必继承 Homebrew 或用户 Shell 的 PATH.venv/bin 中的绝对控制台入口已经包含正确的 Python 环境, Codex 无需找到 uvpython3 或 Homebrew。

macOS 检查与启动 BalatroBot

只读检查:

./scripts/doctor_macos.sh

它检查 macOS、uv、Python 3.13+、Steam Balatro、Lovely、Steamodded、BalatroBot Mod、12346 端口、BalatroBot health、Codex CLI、项目 .venv 和绝对 MCP 入口。

前台启动:

./scripts/start_balatro_macos.sh

快速模式:

./scripts/start_balatro_macos.sh --fast

额外参数原样传给上游:

./scripts/start_balatro_macos.sh --fast --no-shaders --fps-cap 60

脚本使用上游推荐的 uvx balatrobot serve 路径并明确固定 v1.5.2。在 macOS, BalatroBot CLI 直接执行:

~/Library/Application Support/Steam/steamapps/common/Balatro/
Balatro.app/Contents/MacOS/love

同时通过 DYLD_INSERT_LIBRARIES 加载 liblovely.dylib。这是 BalatroBot 当前 macOS launcher 的实现;不是鼠标、OCR、截图或 UI 自动化。

只读验证 health

BalatroBot 启动后,在第二个终端运行:

./scripts/verify_connection.sh

该脚本严格只调用:

  • health

  • rpc.discover

  • gamestate

它不会调用 startplaydiscardbuysellrerollpacknext_round 或任何其他写操作。

配置 Codex 桌面端 MCP

自动配置:

./scripts/configure_codex_mcp.sh

脚本先确认 .venv 和绝对入口存在,然后执行等价于:

codex mcp add balatro \
  --env BALATROBOT_URL=http://127.0.0.1:12346 \
  -- /ABSOLUTE/PATH/TO/balatro-codex-mcp/.venv/bin/balatro-codex-mcp

如果 balatro 已存在,脚本会停止并要求先检查/移除旧配置,不会静默覆盖。成功后 会运行:

codex mcp list

也可以在 Codex 桌面端手动添加:

Settings → MCP servers → Add server → STDIO
Name: balatro
Command: <仓库绝对路径>/.venv/bin/balatro-codex-mcp
Environment: BALATROBOT_URL=http://127.0.0.1:12346

保存后必须重启 Codex 桌面端。重启后在对话框输入:

/mcp

确认 balatro 状态为 connected。可参考 .codex/config.toml.example;示例只含占位路径, 不包含开发机用户名。

环境变量

变量

默认值

说明

BALATROBOT_URL

http://127.0.0.1:12346

BalatroBot JSON-RPC 根地址

BALATROBOT_TIMEOUT

15

单次 HTTP 超时秒数

BALATROBOT_ALLOW_NON_LOOPBACK

0

仅显式设为 1 才允许非回环地址

BALATROBOT_READ_RETRIES

1

只读连接级重试次数,范围 0–3

默认只接受 localhost127.0.0.1::1。URL 不允许凭据、额外路径、query 或 fragment。非回环模式会扩大信任边界,不建议用于普通本地游戏。

MCP 工具

所有工具都有 balatro_ 前缀。

只读工具

工具

用途

balatro_health()

MCP/BalatroBot 状态、health、版本、当前阶段、discover 结果、缺失能力和 macOS 修复命令

balatro_capabilities(refresh=false)

安全上游方法的精简 OpenRPC 参数与 required states;可强制刷新缓存

balatro_get_state(view="decision")

读取紧凑 decision 或保留全部未知字段的 full state

balatro_available_actions()

当前允许/不允许动作、原因、参数、有效索引范围与 token

写工具

每个写工具都强制要求 expected_state_token,不提供可选默认值。

工具

上游方法

主要约束

balatro_start_run(deck, stake, expected_state_token, seed=None)

start

MENU

balatro_select_blind(expected_state_token)

select

BLIND_SELECT

balatro_skip_blind(expected_state_token)

skip

Boss Blind 禁止跳过

balatro_play_cards(cards, expected_state_token)

play

1–5 张、唯一、有效手牌索引

balatro_discard_cards(cards, expected_state_token)

discard

检查剩余弃牌和高亮上限

balatro_cash_out(expected_state_token)

cash_out

ROUND_EVAL

balatro_buy_shop_item(kind, index, expected_state_token)

buy

kind 转为 card/voucher/pack 参数

balatro_reroll_shop(expected_state_token)

reroll

SHOP,检查明显资金不足

balatro_sell_item(kind, index, expected_state_token)

sell

joker/consumable,拒绝 Eternal

balatro_use_consumable(consumable_index, target_cards, expected_state_token)

use

不猜测目标数量

balatro_choose_pack_item(item_index, target_cards, expected_state_token)

pack

转为 {card, targets}

balatro_skip_pack(expected_state_token)

pack

转为 {skip: true}

balatro_rearrange(area, order, expected_state_token)

rearrange

order 必须是完整排列

balatro_next_round(expected_state_token)

next_round

SHOP

所有写操作统一执行:

  1. 读取最新 gamestate

  2. 计算并比较 token。

  3. 校验阶段、参数、资源和索引。

  4. 获取唯一写锁。

  5. 在锁内再次读取状态并校验 token。

  6. 向 BalatroBot 发送恰好一次写 RPC。

  7. 再次读取状态;如果该只读请求失败,使用写响应中的 gamestate 作为明确降级。

  8. 返回上游结果、旧/新 token、完整新 decision state、warnings,并写动作日志。

decision state、state_token 与 0-based 索引

balatro_get_state(view="decision") 保留当前阶段、seed、deck、stake、ante、round、 Blind 目标分数/奖励(上游提供时)/特殊效果、分数、钱、bankrupt_at(上游提供时)、 剩余手数/弃牌数、胜负、手牌、Joker、消耗牌、voucher、商店、补充包、reroll 费用、槽位上限、可用动作、warnings 和 state_token

每张卡或物品都保留原始 BalatroBot 字段,并额外提供:

  • 当前 index

  • balatrobot_idkeylabel/name

  • description

  • ranksuit

  • enhancementeditionsealdebuff

  • buy_costsell_value

所有索引均为 0-based。任何状态改变后,手牌、商店、Joker、消耗牌和 Pack 的 旧索引立即失效。

state_token 使用 action-relevant 状态的规范化 JSON、稳定 key 排序和 SHA-256 生成。同一状态重复读取会得到相同 token;阶段、主要资源、手牌顺序、商店、 Joker、消耗牌或 Pack 改变都会换 token。

如果传入旧 token,工具返回 STALE_STATE、实际 token 和最新 decision state, 且不会执行上游写操作。正确处理方式是重新决策,不是盲目重试原动作。

开始或继续一局

推荐把下面整段交给 Codex:

请用 balatro MCP 玩小丑牌。先调用 balatro_health,再读取
balatro_get_state(view="decision")。如果已有一局,继续当前局,不要返回菜单,
不要开始新局覆盖它;如果状态是 MENU,则用 RED deck、WHITE stake 开始一局。
每次动作前都重新读取最新 decision state,只使用 available_actions 中允许的动作,
所有索引按 0-based,并把最新 state_token 作为 expected_state_token。每个写操作后
检查 new_state。不要盲目重试失败工具,不要跳过 Boss Blind;商店操作前检查钱和
槽位。进入 GAME_OVER 后停止操作,汇总 ante、round、胜负和关键 Joker。

如果只想继续、不允许开始新局,把其中 MENU 分支改为“若为 MENU,只报告当前没有 进行中的局,不要调用 balatro_start_run”。

常见错误

错误/现象

含义与处理

CONNECTION_FAILED

在独立终端运行 ./scripts/doctor_macos.sh,再运行 ./scripts/start_balatro_macos.sh --fast

启动时 JSONDecodeError

若本机 HTTP 请求被系统代理返回 HTML,使用已加入本机地址 NO_PROXY 的启动脚本。其他非 JSON 响应仍须按日志排查,不能靠重复游戏动作修复

UPSTREAM_TIMEOUT

确认游戏未卡死;动作结果未知时先读状态,绝不能重复写操作

STALE_STATE

使用错误附带的 latest_state 重新决策

INVALID_GAME_STATE

当前界面不允许该动作;读 balatro_available_actions

INDEX_OUT_OF_RANGE

状态已变化或索引错误;重新读取 decision state

DUPLICATE_INDEX

卡牌索引或排列有重复

INCOMPLETE_PERMUTATION

rearrange.order 必须包含区域的全部索引且只出现一次

INSUFFICIENT_MONEY / NO_FREE_SLOT

先卖出、选择其他物品或离开商店

BOSS_BLIND_CANNOT_BE_SKIPPED

必须选择并打 Boss Blind

12346 被占用

启动脚本会报出监听进程但不会杀进程;确认是否已有 BalatroBot

balatro 配置已存在

codex mcp get balatro 检查;确认后用移除脚本,再重新添加

/mcp 看不到新配置

完整重启 Codex 桌面端,并确认配置使用 .venv/bin 的绝对入口

更新 BalatroBot 后验证接口

  1. 阅读新 release 的 pyproject.tomlsrc/lua/utils/openrpc.jsonsrc/lua/utils/gamestate.luasrc/lua/endpoints/*.lua

  2. 更新 scripts/start_balatro_macos.sh 中的固定版本。

  3. 启动新版本后运行只读验证:

    ./scripts/verify_connection.sh
  4. 在 Codex 中调用:

    balatro_capabilities(refresh=true)
  5. 运行完整项目验收:

    uv sync
    uv run ruff check .
    uv run ruff format --check .
    uv run ty check
    uv run pytest

如果上游方法参数或状态发生变化,更新兼容表、action guard、工具说明、README 和 tools/list 测试后再允许游戏写操作。

当前上游差异与已知限制

实施时核对了 v1.5.2 和 main,而不是依赖旧教程。发现:

  1. BalatroBot package/release 为 v1.5.2,但 v1.5.2 内嵌 OpenRPC info.version 仍为 1.5.1;main 的相同文件写为 1.5.2。health 中的版本因此 明确标注来源为 rpc.discover.info.version

  2. 当前 rpc.discover 没有发布 endpoint 的 requires_state。项目以 v1.5.2 src/lua/endpoints/*.lua 的实际约束补齐,并在 capabilities 中标注来源。

  3. OpenRPC 的 State enum 没列出 SMODS_BOOSTER_OPENED,但实际 pack.lua 明确要求该状态;项目按运行中的实际 endpoint 名称处理。 同时,v1.5.1/v1.5.2 的 rpc.discover 漏列了实际已注册的 pack endpoint; 项目仅对这两个已核实版本使用 endpoint 兼容表,并在 capabilities 的 compatible_openrpc_omissions 中明确报告,不把它误报为缺失能力。

  4. v1.5.2 gamestate 没有显式暴露 bankrupt_at 或 Blind 奖励。decision state 在上游缺失时返回 null,不伪造数据;购买的最终合法性由 BalatroBot 决定。

  5. 消耗牌目标数量不是当前 OpenRPC 参数 schema 的一部分。项目只校验类型、唯一性 和索引范围,具体数量遵从描述和 BalatroBot 错误。

  6. view="full" 保留上游未知字段;decision 是面向决策的非破坏性字段重组,但不 承诺包含与动作无关的未来顶层字段。

  7. 这是控制接口,不负责安装 Mod,不使用 OCR、截图识别或鼠标坐标,也不在开发 验收中自动开始真实游戏。

日志

  • 动作日志:logs/actions.jsonl

  • 轮转:单文件约 2 MB,保留 3 个备份

  • BalatroBot 自身日志:上游默认 logs/<timestamp>/<port>.log

  • MCP 普通日志:stderr

  • MCP stdout:只含协议数据

动作日志只记录动作名、上游方法、参数形状/索引摘要、结果与 token;不会写环境变量、 完整状态或 seed 值。

移除 Codex MCP 配置

./scripts/remove_codex_mcp.sh

脚本会先显示即将执行的 codex mcp remove balatro,并且只移除名为 balatro 的 Codex MCP 配置。它不会删除项目、虚拟环境、BalatroBot Mod 或游戏存档。

安全边界

本项目绝不注册或转发以下 BalatroBot 能力:

  • add

  • set

  • load

  • save

  • screenshot

  • menu

同样不存在 execute_rawcall_method、任意 JSON-RPC、debugeval、改钱、 改分、生成 Joker、跳 Ante、强制胜利或加载 checkpoint 工具。这些名称不会出现在 tools/list

其他边界:

  • MCP 是 Codex 唯一的游戏控制入口。

  • 写 RPC 自动重试次数永远为 0。

  • 所有写操作共用一个 asyncio.Lock

  • 只读连接失败可以有限重试。

  • HTTP 客户端是单个可复用的 httpx.AsyncClient

  • 进程退出时关闭 HTTP client 和动作日志,不遗留阻止退出的后台任务。

  • 不修改 BalatroBot 上游源码。

  • 不修改 Balatro 存档。

  • 返回主菜单只能由用户直接在游戏界面操作。

  • GAME_OVER 后 instructions 要求停止动作并总结。

开发与测试

默认测试全部使用 httpx.MockTransport,不需要 Balatro 或 BalatroBot:

uv sync
uv run ruff check .
uv run ruff format --check .
uv run ty check
uv run pytest

测试覆盖连接拒绝、超时、HTTP/JSON/JSON-RPC 错误、ID 不匹配、discover 缓存、 unknown fields、decision view、稳定 token、stale 拒绝、索引与排列、参数转换、 写操作零重试、并发写串行化、危险工具缺失,以及 BalatroBot 离线时的真实 STDIO MCP 初始化和 tools/list

Available Tools

18 tools
balatro_available_actionsList currently legal Balatro actionsA
Read-onlyIdempotent

按当前阶段、资源和索引范围列出允许及不允许的写操作,并返回最新 state_token。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the safe read-only nature is covered. The description adds context beyond this: it lists both allowed and disallowed operations, not just a whitelist, and it returns the latest state_token. This gives the agent useful behavioral expectations not present in the structured fields.

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

Conciseness5/5

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

The description is a single, front-loaded sentence that states the core action (list), the subject (allowed/disallowed write operations), the conditions (stage, resources, index range), and the return value (state_token). Every element is necessary, with zero waste or fluff.

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 simple, parameterless query tool with strong annotations and no output schema, the description adequately conveys what the tool returns: a list of legal/illegal write operations and a state_token. It does not specify the exact output format (e.g., plain names vs. structured objects), but that is not essential given the tool's simplicity and the absence of an output schema.

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?

This tool has zero parameters, and schema description coverage is 100% (vacuously). With no parameters to document, the description is not expected to add parameter details. The baseline for 0 params is 4, and the description does not need to compensate for any schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('列出' / lists), identifies the resource ('允许及不允许的写操作' / allowed and disallowed write operations), and states the criteria (current stage, resources, index range). This clearly distinguishes it from sibling action tools like balatro_discard_cards or balatro_play_cards, which perform actions rather than list them.

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 description implies usage context: it is relevant to the current stage, resources, and index range, and it returns a state_token. However, it does not explicitly state when to use this tool versus alternatives like balatro_get_state, nor does it provide exclusions (e.g., 'use this before any action to verify legality'). Guidance is only implied, not explicit.

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

balatro_buy_shop_itemBuy a shop itemA
Destructive

购买商店物品;先校验 SHOP、索引、资金及明显的槽位不足。

ParametersJSON Schema
NameRequiredDescriptionDefault
kindYescard、voucher 或 pack;决定上游 buy 参数名。
indexYes该商店区域的当前 0-based 索引。
expected_state_tokenYes最新 state_token;必填。

TDQS

A4/5.0
Behavior4/5

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

Annotations already mark this as destructive. The description adds valuable behavioral details: it performs validations (SHOP, index, funds, slot insufficiency) before buying. This goes beyond the annotations, though it doesn't describe the full side effects (e.g., item removal, money deduction).

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

Conciseness5/5

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

The description is a single, concise sentence in Chinese. It front-loads the primary action and adds a compact validation note. No wasted words.

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 straightforward shop-buy action with three parameters and no output schema, the description covers the core purpose and important preconditions. It lacks details about post-buy state changes, but the destructive annotation and game context make it sufficiently complete for the agent.

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?

Schema description coverage is 100%, with each parameter (kind, index, expected_state_token) already documented. The description adds no parameter-specific meaning beyond mentioning 'index' and 'funds' in the validation context, which is not substantial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: '购买商店物品' (buy a shop item). It clearly distinguishes this from siblings like sell_item and discard_cards. The additional validation mention further clarifies the tool's scope.

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 description implies usage when the agent wants to purchase a shop item, but provides no explicit guidance on when not to use it or alternatives. The validation note ('先校验 SHOP、索引、资金及明显的槽位不足') gives context about preconditions but not tool selection.

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

balatro_capabilitiesBalatroBot safe capabilitiesA
Read-onlyIdempotent

返回安全方法的精简 OpenRPC 参数与 required state;不返回被禁用的调试工具。

ParametersJSON Schema
NameRequiredDescriptionDefault
refreshNoTrue 时重新调用 rpc.discover;False 时优先使用启动缓存。

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds useful context about filtering out disabled debug tools and returning 'required state', which are behavioral traits beyond the annotations. No contradictions found.

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

Conciseness5/5

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

The description is a single concise sentence that front-loads the core purpose and includes a relevant exclusion clause. No unnecessary words or repetition.

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 simple capabilities-discovery tool with no output schema, the description adequately states what is returned (parameters and required state) and what is excluded. The ambiguous phrase 'required state' is minor but the overall context is sufficient.

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?

Schema description coverage is 100% with the 'refresh' parameter fully described. The tool description does not add parameter-level meaning, but the schema already carries that burden, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns 'safe methods' parameters and required state, and explicitly excludes disabled debug tools. It distinguishes itself from sibling game-action tools by focusing on capability discovery.

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 description implies usage for discovering safe methods but does not explicitly state when to use it versus alternatives or provide exclusions. The name 'capabilities' adds context, but the guidance is implicit rather than direct.

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

balatro_cash_outCash out round rewardsA
Destructive

仅 ROUND_EVAL 可用,结算奖励并进入商店。

ParametersJSON Schema
NameRequiredDescriptionDefault
expected_state_tokenYes最新 state_token;必填。

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already flag the tool as destructive and non-read-only, so the mutating nature is known. The description adds the ROUND_EVAL availability and shop transition, which is useful, but it doesn't detail what exactly is finalized or whether any actions become irreversible beyond the annotation. This is adequate but not rich.

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

Conciseness5/5

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

The description is a single compact sentence that front-loads the availability constraint and then states the action and result. There is no filler or redundant information, making it appropriately concise.

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 simple state-transition tool, the description covers when it can be used and what it does, and with annotations and schema covering safety and parameters, it is reasonably complete. It lacks output-format detail, but no output schema exists, so this is acceptable.

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 only parameter, expected_state_token, is fully described in the schema as the latest state token and required. The description adds no parameter-level insight, but with 100% schema coverage, the baseline of 3 is appropriate.

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 states the action clearly: 'settles rewards and enters the shop' and restricts it to ROUND_EVAL, which distinguishes it from siblings like play_cards or next_round. However, it does not specify what rewards are included (e.g., money, interest), leaving slight ambiguity.

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

Usage Guidelines4/5

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

The phrase '仅 ROUND_EVAL 可用' gives an explicit precondition for when the tool may be called, which is strong guidance. It doesn't name alternatives or exclusions beyond the state gate, but the context is sufficient for the agent to decide when to invoke it.

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

balatro_choose_pack_itemChoose an opened pack itemB
Destructive

映射上游 pack {card, targets};不猜测 Tarot/Spectral 目标数量。

ParametersJSON Schema
NameRequiredDescriptionDefault
item_indexYes打开的 Pack 内当前 0-based 索引。
target_cardsYes需要时传手牌 0-based 目标索引;否则 null。
expected_state_tokenYes最新 state_token;必填。

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already mark the tool as destructive and not read-only. The description adds one behavioral constraint: the agent must not guess Tarot/Spectral target counts. But it does not say what gets consumed, what happens after the choice, or how expected_state_token is validated, so behavioral disclosure remains limited.

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 very short and contains no filler. However, the phrase '映射上游 pack {card, targets}' is cryptic and could be clearer; despite being brief, it sacrifices some clarity for compactness.

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

Completeness3/5

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

Given the destructive annotation and lack of an output schema, the description does not fully explain the consequences of choosing an item or the expected return. It gives one important operational warning but otherwise relies on the title and schema, making it adequate but with clear gaps.

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 100%, so the baseline is 3. The description adds meaning beyond the schema by warning not to guess Tarot/Spectral target counts, clarifying that target_cards must be explicitly provided and should not be inferred. This is useful extra semantics for the target_cards parameter, while item_index and expected_state_token are already well described in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The title clearly says 'Choose an opened pack item', but the description itself, '映射上游 pack {card, targets}', describes an internal mapping rather than explicitly stating the purpose. It is not as clear as a direct 'chooses the item at index N from the opened pack' and does not distinguish itself from skip_pack in the description.

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 description includes '不猜测 Tarot/Spectral 目标数量', which implies the agent must provide exact target_cards when needed rather than inferring them. However, it gives no explicit 'use when' context, no exclusions, and no comparison to alternative actions like skip_pack.

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

balatro_discard_cardsDiscard hand cardsA
Destructive

在 SELECTING_HAND 弃牌;先检查剩余弃牌次数。

ParametersJSON Schema
NameRequiredDescriptionDefault
cardsYes互不重复的当前手牌 0-based 索引。
expected_state_tokenYes最新 state_token;必填。

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already mark this as destructive (destructiveHint=true), so the mutation is transparent. The description adds a useful behavioral note about checking the remaining discard count before acting, but does not disclose other consequences like card removal or state token requirement beyond the schema.

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

Conciseness5/5

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

The description is a single concise sentence, front-loaded with the action and state, with no redundant information. It effectively communicates the essential guidance in one line.

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 simple discard tool with two well-described parameters, the description covers the necessary state (SELECTING_HAND) and a key precondition (checking discards). It could mention error handling or post-effects, but given the annotations and schema, it is adequately complete.

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?

Schema description coverage is 100%, and both parameters (cards, expected_state_token) are well-documented in the schema. The description does not add extra parameter meaning, so the baseline score of 3 applies.

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 identifies the action as discarding ('弃牌') in the specific game state 'SELECTING_HAND', which distinguishes it from sibling tools like balatro_play_cards. The title also reinforces the purpose. However, it could be more explicit about what 'discard' results in.

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 description provides some usage context by specifying '在 SELECTING_HAND 弃牌' and instructing to '先检查剩余弃牌次数' (first check remaining discard count). This implies a precondition but does not explicitly compare with alternatives or state when not to use, such as preferring play_cards.

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

balatro_get_stateRead current Balatro stateA
Read-onlyIdempotent

读取最新状态。每次动作前调用;decision 返回 state_token 与所有有效 0-based 索引。

ParametersJSON Schema
NameRequiredDescriptionDefault
viewNodecision 为紧凑决策视图;full 保留全部上游字段。decision

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds useful behavioral context: it should be invoked before every action and the decision view returns a state_token plus valid indices, going beyond the structured annotations without contradicting them.

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

Conciseness5/5

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

Two short sentences, front-loaded with the core purpose, and no redundant words. Every sentence adds value: the first states the action and timing, the second describes the return contents.

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?

Given the simple tool, rich annotations, and full schema coverage, the description provides enough context: when to call it, what the decision view returns, and that full retains all upstream fields. It doesn't detail the full output structure, but there's no output schema and the description adequately compensates for typical use.

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?

The schema fully describes the 'view' parameter (100% coverage), and the description enriches it by explaining that 'decision' returns state_token and all valid 0-based indices, while 'full' retains upstream fields. This adds practical meaning beyond the enum names.

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 tool reads the latest state and explicitly says to call before each action. It also specifies that the decision view returns state_token and valid 0-based indices, distinguishing it from action-oriented siblings like balatro_available_actions, though it doesn't explicitly contrast with them.

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

Usage Guidelines4/5

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

Provides clear when-to-use guidance via '每次动作前调用' (call before every action), which is strong contextual direction. It does not mention when not to use it or name alternative tools, so it falls short of a 5.

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

balatro_healthBalatro health and diagnosticsA
Read-onlyIdempotent

检查 MCP、BalatroBot、rpc.discover 与当前游戏状态;离线时返回 macOS 修复命令。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds the notable behavior of returning macOS repair commands when offline, which is useful context beyond the annotations.

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

Conciseness5/5

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

The description is a single sentence that is front-loaded with the action and targets, with zero wasted words.

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 zero-parameter, read-only diagnostics tool, the description provides adequate context: what is checked and the offline repair-command behavior. It does not explain the output format, but no output schema exists, so the description carries that burden lightly; minor ambiguity about what 'offline' refers to.

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?

The tool has zero parameters and the schema is empty, so there is nothing for the description to add. With no parameters, a baseline of 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool checks MCP, BalatroBot, rpc.discover, and current game state, distinguishing it from sibling action tools. The verb '检查' (check) and specific resources make the purpose unambiguous.

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 description implies use for health diagnostics and mentions offline behavior with macOS repair commands, but it does not explicitly contrast with overlapping siblings like balatro_capabilities or balatro_get_state, nor state when not to use it.

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

balatro_next_roundLeave shop for next roundA
Destructive

仅 SHOP 可用,进入下一次 Blind 选择。

ParametersJSON Schema
NameRequiredDescriptionDefault
expected_state_tokenYes最新 state_token;必填。

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark this as destructive (destructiveHint=true) and read-only=false, so the mutating nature is known. The description adds that it is only available in the shop and that it leads to the next Blind selection, providing useful behavioral context beyond annotations.

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

Conciseness5/5

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

The description is one short sentence that states the availability and outcome, with no wasted words. It is appropriately sized for a simple navigation action.

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?

Given the simple action, the description provides sufficient context (shop-only, next Blind). No output schema exists, but for this tool the return value is not critical. It could mention irreversibility, but annotations already signal destructiveness.

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 covers 100% of the parameter with description '最新 state_token;必填' (latest state_token; required). The tool description adds no extra parameter details, but since schema coverage is full, baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '仅 SHOP 可用,进入下一次 Blind 选择' (only available in shop, proceed to next Blind selection), specifying the action and resource. It distinguishes from sibling tools like select_blind and skip_blind by its scope (leaving the shop).

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

Usage Guidelines4/5

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

The description explicitly states '仅 SHOP 可用' (only available in SHOP), giving a clear condition for use. It doesn't explicitly name alternatives, but the context and sibling list make it obvious that this is for leaving the shop phase rather than selecting/skipping a blind directly.

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

balatro_play_cardsPlay hand cardsA
Destructive

在 SELECTING_HAND 出牌;不自动重试。

ParametersJSON Schema
NameRequiredDescriptionDefault
cardsYes1 至 5 个互不重复的当前手牌 0-based 索引。
expected_state_tokenYes最新 state_token;必填。

TDQS

A3.7/5.0
Behavior4/5

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

Annotations mark the tool as destructive and non-readOnly, but the description adds the crucial behavioral note that it 'does not automatically retry.' This goes beyond the annotations and is important for the agent to know that failed attempts won't be silently repeated. However, other behavioral details (e.g., state progression) are not disclosed.

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

Conciseness5/5

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

The description is exceptionally concise: two short sentences with no filler. The key information (action and phase) is front-loaded, and the no-retry note is a valuable addition without unnecessary length.

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

Completeness3/5

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

For a simple action with two well-documented params, the description is adequate but leaves gaps. It does not explain what happens after playing cards (e.g., state change, score evaluation, or the need to use the returned state token). Given the state-token mechanism, this missing information could be critical for the agent's next steps.

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 input schema provides complete documentation for both parameters (distinct 0-based indices, required latest state_token), so the description does not need to add parameter details. It adds no extra parameter context beyond the schema, matching the baseline 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 action ('Play cards') and the context ('SELECTING_HAND'), distinguishing it from sibling tools like balatro_discard_cards. The title also reinforces the purpose, but it lacks detail on what 'play' entails in terms of game mechanics.

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?

It explicitly mentions the phase SELECTING_HAND, which indicates when to use it. However, it does not explicitly contrast with alternatives or provide exclusions, such as 'use discard instead when you want to remove cards.' The phase implication is useful but not fully elaborated.

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

balatro_rearrangeRearrange a card areaA
Destructive

重新排序指定区域;order 不得缺失、重复或越界。

ParametersJSON Schema
NameRequiredDescriptionDefault
areaYeshand、jokers 或 consumables。
orderYes当前区域所有 0-based 索引的完整排列。
expected_state_tokenYes最新 state_token;必填。

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnly=false, so the safety profile is known. The description adds valuable behavioral context by stating that 'order 不得缺失、重复或越界' (order must not be missing, duplicate, or out of bounds), which specifies the exact validation constraint. It does not elaborate on reversibility or effects, but the destructive flag covers the main concern.

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

Conciseness5/5

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

The description is one concise sentence that states the action and the key constraint, with no wasted words. It is appropriately front-loaded and serves as a minimal yet effective summary.

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 simple reorder tool with full schema coverage and clear annotations, the description is sufficiently complete. It covers the core operation and the critical ordering constraint, though it does not mention failure cases or return values. The absence of an output schema reduces the need for return value documentation.

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?

Schema description coverage is 100%, with detailed descriptions for all three parameters: area enum, order as a full permutation, and expected_state_token. The description repeats the permutation constraint but does not add new parameter semantics beyond the schema's existing coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action: '重新排序指定区域' (reorder the specified area), with a clear verb and resource. This clearly distinguishes it from sibling tools like play_cards, discard_cards, or use_consumable, as reordering is a unique operation.

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 description implies usage for reordering a card area, but does not explicitly state when to use this tool versus alternatives. It does not mention prerequisites or conditions, though the required expected_state_token is implied by its presence in the schema. The guidance is only implied, not explicit.

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

balatro_reroll_shopReroll the shopA
Destructive

仅 SHOP 可用;商店索引在刷新后全部失效。

ParametersJSON Schema
NameRequiredDescriptionDefault
expected_state_tokenYes最新 state_token;必填。

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false. The description adds a meaningful side-effect disclosure: '商店索引在刷新后全部失效' (all shop indices become invalid after refresh), which is behavioral context beyond annotations. No contradiction detected.

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

Conciseness5/5

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

The description is extremely concise—one short sentence with two clauses—and every part earns its place: availability condition and invalidation side-effect. It is front-loaded and free of filler.

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?

This is a simple tool with one parameter and no output schema. The description covers the critical constraints (SHOP-only usage and index invalidation) and is adequate for an agent to use it correctly. A slight additional statement about what rerolling actually does (e.g., refreshes items) would make it fully complete, but the title provides that.

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 single parameter expected_state_token is fully documented in the schema (100% coverage), so the description does not need to add parameter details. The baseline of 3 applies because the schema carries the burden and the description does not contradict or add extra parameter meaning.

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 title 'Reroll the shop' clearly identifies the action and resource, distinguishing it from siblings like buy/discard/sell. The description adds availability context but does not explicitly restate the core purpose, relying on the title for that.

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

Usage Guidelines4/5

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

The description states '仅 SHOP 可用' (only available in SHOP), providing clear context for when the tool is applicable. It does not mention alternatives or explicit exclusions, but the condition is a useful usage guideline.

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

balatro_select_blindSelect current BlindB
Destructive

选择当前 Blind。所有旧索引在动作后失效。

ParametersJSON Schema
NameRequiredDescriptionDefault
expected_state_tokenYes最新 state_token;必填。

TDQS

B3.3/5.0
Behavior3/5

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

The description adds the note '所有旧索引在动作后失效' (all old indexes become invalid after the action), which is a behavioral consequence not captured by the annotations. However, it does not elaborate on other side effects like state token consumption or irreversibility, with annotations already marking this as destructive.

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

Conciseness5/5

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

The description is exceptionally concise: two short sentences. The first states the purpose, and the second provides a necessary behavioral warning. No filler or redundant content exists.

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

Completeness3/5

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

For a one-parameter action with no output schema, the description provides the essential purpose and an invalidation note. However, it lacks context about game progression (e.g., what happens after selecting a blind) and does not mention when selection is appropriate versus skipping. It is minimally adequate but not thorough.

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 fully covers the only parameter expected_state_token ('最新 state_token;必填'), so the tool description adds no additional semantic meaning. Baseline 3 is appropriate given 100% 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 action: '选择当前 Blind' (Select current Blind) with a specific verb and resource. It is distinguishable from the sibling 'balatro_skip_blind' by the explicit 'select' wording, though it does not explicitly differentiate itself from alternatives.

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?

No guidance is provided on when to use this tool versus alternatives like balatro_skip_blind. The description assumes game context that an agent may not have, offering no conditions or exclusions.

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

balatro_sell_itemSell a Joker or consumableA
Destructive

出售 Joker 或消耗牌;Eternal Joker 会提前拒绝。

ParametersJSON Schema
NameRequiredDescriptionDefault
kindYesjoker 或 consumable。
indexYes对应区域的当前 0-based 索引。
expected_state_tokenYes最新 state_token;必填。

TDQS

A4/5.0
Behavior4/5

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

Annotations already mark the tool as destructive and not read-only. The description adds a specific behavioral constraint (Eternal Joker rejection) that is not captured in structured data. It does not contradict annotations, and the extra detail provides useful context beyond the basic safety profile.

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

Conciseness5/5

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

The description is a single concise sentence that front-loads the main action and includes a key caveat. Every word is informative, with no filler or repetition relative to the schema/annotations.

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 simple destructive action with full schema coverage and no output schema, the description covers the crucial operation and the main behavioral exception. It could optionally mention the outcome of a successful sale (e.g., removal and monetary gain), but the core context is sufficient for correct invocation.

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?

Schema description coverage is 100%, and parameter descriptions in the schema are clear (kind, index, expected_state_token). The description adds no additional parameter-level meaning, so the baseline of 3 is appropriate because the schema already carries the semantic load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('出售' = sell) and the resource ('Joker 或消耗牌' = Joker or consumable), making the tool's purpose unambiguous. It also distinguishes itself from sibling tools like 'use_consumable' by specifying the selling action, not just using.

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 description does not explicitly compare with alternatives or state when to use selling vs. using. However, the note that 'Eternal Joker 会提前拒绝' provides a clear exclusion condition (don't attempt to sell Eternal Jokers), giving some usage guidance. Overall usage context is implied but not fully articulated.

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

balatro_skip_blindSkip current non-Boss BlindA
Destructive

跳过 Small/Big Blind;Boss Blind 会在本地被拒绝。

ParametersJSON Schema
NameRequiredDescriptionDefault
expected_state_tokenYes最新 state_token;必填。

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate destructiveHint=true, but the description adds the key behavior that Boss Blind is rejected locally. This is valuable context beyond the annotations, warning the agent that attempting to skip a Boss Blind will fail. It does not elaborate on other side effects, but the added rejection behavior justifies a 4.

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

Conciseness5/5

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

The description is a single, compact sentence that fully conveys the tool's purpose and a key behavioral exception. No filler words, and all necessary information is front-loaded.

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 simple tool with one parameter and no output schema, the description covers the essential scope (non-Boss blinds) and the rejection behavior. It doesn't mention return values, but the presence of get_state and other sibling tools makes that less critical. Overall, adequate for reliable invocation.

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 input schema fully describes the only parameter (expected_state_token) with its purpose and requirement. The description adds no extra meaning about the parameter, so the baseline of 3 is appropriate given 100% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Skip Small/Big Blind', with a specific verb and resource. It also distinguishes from sibling tools by excluding Boss Blind. The title reinforces the non-Boss scope, making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description implies when to use this tool: when the current blind is a Small or Big Blind. It explicitly notes Boss Blind will be rejected, which serves as an exclusion. While it doesn't name alternatives like 'select_blind', the context is clear enough for an agent.

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

balatro_skip_packSkip an opened packC
Destructive

映射上游 pack {skip:true}。

ParametersJSON Schema
NameRequiredDescriptionDefault
expected_state_tokenYes最新 state_token;必填。

TDQS

C2.1/5.0
Behavior2/5

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

The description adds no behavioral context beyond the annotations. While destructiveHint=true already flags destructive behavior, the description does not explain what skipping entails (e.g., pack discarded, irreversible) or whether it requires an opened pack.

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

Conciseness3/5

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

The description is extremely brief, making it concise in length, but this brevity sacrifices clarity. The single sentence is under-specified and does not earn its place as useful guidance.

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 destructive annotation and the need to skip an opened pack, the description lacks essential details about consequences, prerequisites, or state management. With no output schema, the description should clarify expected behavior but fails to do so.

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 description does not mention the expected_state_token parameter, but schema coverage is 100% and the schema already describes it as '最新 state_token;必填'. The description adds no extra semantic value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '映射上游 pack {skip:true}' is cryptic and does not clearly state that the tool skips an opened pack. The title provides some clarity, but the description itself lacks a specific verb+resource action and does not distinguish from sibling tools like skip_blind.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives. The description gives no context about prerequisites (e.g., having an opened pack) or scenarios where skipping is appropriate.

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

balatro_start_runStart a Balatro runA
Destructive

仅 MENU 可用;不会覆盖或重置一局已经存在的游戏。

ParametersJSON Schema
NameRequiredDescriptionDefault
deckYesBalatroBot deck enum,例如 RED。
seedNo可选固定 seed。
stakeYesBalatroBot stake enum,例如 WHITE。
expected_state_tokenYes最近 decision state 的 state_token;必填。

TDQS

A4.3/5.0
Behavior5/5

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

Despite destructiveHint=true, the description discloses a key behavioral nuance: it will not overwrite or reset an existing game. It also adds a state restriction (MENU only). These details go well beyond the annotations and help the agent predict side effects.

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

Conciseness5/5

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

The description is one compact sentence that states two crucial constraints without any redundancy. It is front-loaded and easy to parse.

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

Completeness3/5

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

The description covers availability and non-destructive behavior, but since there is no output schema, it doesn't explain what the tool returns or how expected_state_token relates to the call flow. It's adequate for a simple action but leaves some operational context implicit.

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 already provides descriptive text for all 4 parameters (100% coverage), so the description doesn't need to repeat parameter details. The description itself adds no parameter-specific guidance, which matches the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The tool name and title clearly state 'Start a Balatro run', and the description adds scope by specifying it only works in MENU and won't overwrite an existing game. This differentiates it from all in-run sibling tools (play, discard, buy, etc.).

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

Usage Guidelines4/5

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

The description gives an explicit when-to-use condition: '仅 MENU 可用' (only available in MENU). It also clarifies it won't reset an existing run. It doesn't name alternatives, but no sibling tool serves the same purpose, so this is a clear contextual guideline.

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

balatro_use_consumableUse a consumableB
Destructive

使用消耗牌;目标规则最终以 BalatroBot 校验和拒绝结果为准。

ParametersJSON Schema
NameRequiredDescriptionDefault
target_cardsYes需要时传手牌 0-based 索引;不猜测目标数量。
consumable_indexYes消耗牌区域的当前 0-based 索引。
expected_state_tokenYes最新 state_token;必填。

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint: true. The description adds that target rules are 'ultimately subject to BalatroBot validation and rejection results,' disclosing a validation/rejection behavior not captured by annotations. However, it does not explain what is destroyed or what the target rules entail, so the added context is limited.

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

Conciseness5/5

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

Two short sentences, front-loaded with the purpose. The second sentence adds a necessary behavioral caveat without unnecessary detail. The description is concise and well-structured with no filler.

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?

With no output schema, the description should clarify what happens when a consumable is used and what the tool returns. It only provides a vague validation caveat, leaving the overall effect and appropriate use cases unclear. The schema helps with parameters but not with behavioral context.

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 input schema covers all three parameters with descriptive meanings: consumable_index (0-based index), target_cards (hand indices when needed), and expected_state_token (latest state token). The description adds no extra parameter semantics, and with 100% schema coverage the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states '使用消耗牌' (use a consumable card), which clearly specifies the verb and resource. This distinguishes it from sibling tools like play_cards and discard_cards by focusing on consumables. The caveat about validation does not obscure the primary purpose.

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 offers no guidance on when to use this tool versus alternatives. It does not mention prerequisites, contexts where a consumable should be used, or how it differs from other actions. The validation caveat is not a usage guideline.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 18 tool updatesv0.1.0
    • First observedbalatro_available_actions
    • First observedbalatro_buy_shop_item
    • First observedbalatro_capabilities
    • First observedbalatro_cash_out
    • First observedbalatro_choose_pack_item
    • First observedbalatro_discard_cards
    • First observedbalatro_get_state
    • First observedbalatro_health
    • First observedbalatro_next_round
    • First observedbalatro_play_cards
    • First observedbalatro_rearrange
    • First observedbalatro_reroll_shop
    • First observedbalatro_select_blind
    • First observedbalatro_sell_item
    • First observedbalatro_skip_blind
    • First observedbalatro_skip_pack
    • First observedbalatro_start_run
    • First observedbalatro_use_consumable

TDQS

A3.5/5.0

Scored across 18 tools

Disambiguation4/5

Most tools map to distinct game actions (play/discard, buy/reroll, etc.), so there is little confusion. The only slight overlap is among the informational tools (get_state, available_actions, capabilities), which all provide state/action data but serve different purposes.

Naming Consistency4/5

All tools share the 'balatro_' prefix and use snake_case. Most follow a verb_noun pattern, but a few (health, capabilities, available_actions, next_round) are noun-like, creating minor inconsistency. Overall, the naming is still predictable and readable.

Tool Count4/5

With 18 tools, the set is slightly above the ideal 3-15 range, but each tool corresponds to a specific part of the Balatro game cycle. The count feels justified for the game's complexity, though a few informational tools could potentially be consolidated.

Completeness5/5

The tool set covers the entire game loop: starting a run, selecting/skipping blinds, playing/discarding cards, using consumables, choosing/skipping packs, shop interactions, rearranging, cashing out, and moving to the next round. Informational tools (state, health, capabilities, available actions) fill any remaining needs, leaving no significant dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    B
    maintenance
    Exposes Anthropic's computer-use action surface (screenshot, click, move, keyboard, clipboard, batch) against a persistent desktop display via MCP stdio protocol. Enables AI agents to control a virtual desktop environment through natural language instructions.
    24
    MIT