Skip to main content
Glama

bind_bridge

Binds a Unity bridge to the current MCP session, remembers the mapping across server restarts, and supports auto-detection, status checks, unbinding, and restoring prior connections.

Instructions

将 Unity bridge 绑定到当前 MCP 会话。

这个工具会记住当前会话的绑定关系,重启 MCP server 后可以自动恢复。 适合需要长期固定连接到特定 Unity 实例的场景。

Args: port: 要绑定的端口号。如果不指定,显示当前绑定状态。 auto: 设为 True 时自动检测并绑定。如果只有一个实例则自动绑定, 如果有多个实例则返回列表让用户选择。 unbind: 设为 True 时解除当前会话的绑定。 restore: 设为 True 时从持久化文件恢复之前的绑定。

Returns: 操作结果,包含绑定状态、会话 ID、端口信息等。

Examples: # 自动检测并绑定(如果只有一个实例) bind_bridge(auto=True)

# 绑定到指定端口
bind_bridge(port=17874)

# 查看当前绑定状态
bind_bridge()

# 解除绑定
bind_bridge(unbind=True)

# 恢复之前的绑定
bind_bridge(restore=True)

Input Schema

NameRequiredDescriptionDefault
autoNo
portNo
unbindNo
restoreNo
wait_secondsNo
force_takeoverNo
expected_bridge_idNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and largely does so: it discloses session-scoped memory, persistence/restore behavior, multi-instance auto-detection semantics, and unbind as a distinct mode. It stops short of stating failure modes, whether binding evicts another session, or what the returned status contains in any detail.

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?

Purpose and persistence guarantee are front-loaded, and the Args section is compact. The Examples block is somewhat redundant with the Args prose but does usefully disambiguate the mutually exclusive modes, so it earns most of its space.

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

Completeness5/5

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

Correctly omits return-value details because an output schema exists, and covers the primary mode-switching parameters plus the persistence contract. The remaining gaps (three undocumented booleans) are real but narrow relative to a tool whose whole surface is 'bind, inspect, or unbind'.

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 0% across 7 parameters, so the description must compensate. It clearly explains four of them (port, auto, unbind, restore), but wait_seconds, force_takeover, and expected_bridge_id are never mentioned, and force_takeover in particular is a consequential behavioral knob left undocumented.

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 first line states a specific verb and resource: binding a Unity bridge to the current MCP session, with the added scope that the binding is persisted across server restarts. It does not, however, distinguish itself from close siblings like select_bridge or bridge_admin, which an agent must still infer from their names alone.

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?

It gives clear context for when the tool is the right choice ('适合需要长期固定连接到特定 Unity 实例的场景'), and the per-argument notes explain the auto-detect tradeoff when multiple instances exist. It never names an alternative tool or an explicit when-not-to-use condition, so routing against select_bridge/bridge_admin remains guesswork.

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