Skip to main content
Glama

mc_connect

Connect a Minecraft character to a server using a configured account and specified host, port, version, or subserver, then wait for chunks to load before acting.

Instructions

连接到 MC 服务器。这里没有账号密码——用哪个账户由mc_accounts 维护的账户决定: 先用 mc_accounts 看有哪些账户(action:"use" 选定,或用 account 参数指名 innerID)。 服务器地址/端口/子服由你传(host 不传就看环境变量 MC_HOST,两个都没有会直接报错);连接成功后会等区块加载完成。 登录失败时会明确说"需要用户处理"——那就告诉用户去终端跑 mcp-mc-agent accounts login <innerID>(正版)或 accounts refresh <innerID>(皮肤站)。

Input Schema

NameRequiredDescriptionDefault
hostNo服务器地址(如 example.com)
portNo端口(默认 25565)
forceNo已经连着也要**先断开再连**(普通 mc_connect 在已连着时是空操作)。⚠️ 这是**真退出游戏再进服**:服务器会广播「你离开了游戏」,玩家会看到你消失几秒。**别拿它当「刷新区块」的常规手段** —— 视图不刷新时先想是不是自己垫脚/搭高放的方块,再走远 32 格回来让区块重发;非做不可先 mc_say 说一声。
accountNo(可选)用哪个账户:innerID(mc_accounts 里能看到);不传用本会话选定的/默认账户
versionNoMC 版本(如 1.20.4 / 1.21.4)。**默认不传 = 自动探测**(发 STATUS ping 按协议号反查),这是推荐用法;只有探测失败时才手填。
subserverNo子服域名(Velocity fakeHost 路由,如 mc.example.com)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that the call blocks until chunk loading completes, that omitting host with no MC_HOST errors out, and that force causes a real disconnect/rejoin visible to other players. It stops short of timeouts, retry behavior, or what a successful connect returns.

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 key constraint (no credentials here, see mc_accounts) and then the host/env-var rule. The force guidance is the longest passage and borders on instructional over-sharing, but it is actionable and each clause maps to a real failure mode.

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 6-parameter, zero-required, no-annotation tool this covers prerequisites, defaults, failure modes, and out-of-band remediation commands. Missing only return-value/pagination behavior, which is minor since no output schema exists but the agent could benefit from knowing what a successful connect yields.

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, but the description adds non-schema semantics: host falls back to the MC_HOST environment variable, account defaults to the session-selected account, version should normally be omitted for auto-detection, and force is explicitly not a chunk-refresh tool. These are cross-parameter behaviors the schema does not state.

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?

States a specific verb+resource (connect to an MC server) and immediately scopes it against mc_accounts by declaring '这里没有账号密码' – account choice is delegated. An agent can distinguish this from mc_disconnect/mc_accounts/mc_sessions without opening a schema.

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?

Gives a clear workflow: check mc_accounts first, select with action:"use" or name an innerID, and pass host/port yourself (falling back to MC_HOST). It also tells the agent when NOT to use force and what to do on login failure. It lacks only an explicit comparison to sibling tools like mc_sessions or mc_status.

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