Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENCLAW_BINNoOpenClaw 可执行文件路径 / Path to the OpenClaw executable./opt/homebrew/bin/openclaw
OPENCLAW_NODE_BINNoNode.js 可执行文件路径 / Path to the Node.js executable (defaults to the current process's Node binary).process.execPath
OPENCLAW_BRIDGE_HOMENo审计日志目录 / Directory for audit logs.~/Library/Application Support/openclaw-mcp-bridge

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

本服务器把任务下发给本机 OpenClaw 的 agent,用于语音 / 远程控制场景。

使用顺序:

  1. 第一次使用、或不确定可以点名谁时,先调 oc_agents 获取本机 agent 的 id、名字、别名和 defaultAgent。agent 名单每台机器都不同,不要凭空猜名字。

  2. 派活用 oc_run(agent, message, wait_seconds)。agent 填 oc_agents 返回的名字或别名;用户没有点名时使用 defaultAgent。

  3. status=done 时,reply 是完整结果,voice.speak 是适合直接朗读的一句话;语音场景只播报 voice.speak。voice.needsSummary 或 replyTruncated 为 true 表示内容偏长 / 已被截断,需要时再展开或总结。

  4. status=running 表示任务还在跑:用返回的 runId 调 oc_wait 继续等,不要重复 oc_run(同一会话已有任务时 oc_run 会返回 SESSION_BUSY,并带上当前 runId)。

  5. 回看本轮对话用 oc_last;中止任务用 oc_cancel(runId)。

约束:写操作会被 agent 在本机真实执行,删除、重启、对外发送这类破坏性动作先跟用户确认。replyUnavailable 只表示没取到回复,不代表任务失败。用户点名的 agent 不在 oc_agents 名单里时,不要挑一个相近的顶上,把可用名单告诉用户。

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
oc_agentsA

列出本机 OpenClaw 可用的 agent:id、名字、别名、是否默认、execRisk(allow=可落地动作,deny=只读或纯回复)。agent 名单来自本机的 config.json,每台机器都不同——用户提到某个名字、或你不确定能点名谁时,先调本工具确认,不要凭猜测点名。返回的 name 或 aliases 可以直接当作其他工具的 agent 参数。结果缓存 60 秒,refresh=true 强制刷新。Gateway 不在时返回 GATEWAY_UNAVAILABLE。语音场景只报名字和默认 agent,不要把 JSON 读出来。

oc_runA

向指定 agent 下发任务,并同步等待最多 wait_seconds(默认 20,最大 120)。 参数:agent 填 oc_agents 返回的名字或别名,留空则使用 config.json 里的 defaultAgent;用户点名的 agent 不在 oc_agents 列表里时不要调用本工具,直接告诉用户没有这个 agent。message 只放任务本身,不要带“让某某做”的转述。 安全:任务会被 agent 在本机真实执行,不是模拟。删除、格式化、重启、对外发送消息等破坏性动作先跟用户确认;下发时尽量限定范围。 返回判读:status=done 时 reply 是完整结果,voice.speak 是适合朗读的短句——语音场景只播报 voice.speak,reply 只用于屏幕查看或回答追问,不要整段朗读;voice.needsSummary 或 replyTruncated=true 表示内容偏长或被截断,此时用 1–3 句话总结 reply,不要朗读代码、日志、diff、JSON、URL 或长列表;voice 提示可能含敏感信息时不要复述具体值。status=running 表示仍在跑,请用返回的 runId 调 oc_wait 继续等,不要重复调用本工具;同一会话已有任务时会返回 SESSION_BUSY 并带上当前 runId;submitReconciled=true 表示提交响应丢失但已确认任务在跑,按 running 处理。 限流默认 6 次/分钟,超限返回 RATE_LIMITED 与重试时间,不要立刻重发。

oc_waitA

按 runId 继续等待或查询已下发的任务,最多 timeout_seconds(0=只查状态不等待,默认 0)。刚下发还没结果、或用户问“怎么样了”时用。done 时返回本轮 reply 与 voice 元数据,按 voice.speak 播报或做 1–3 句总结;running 表示还在跑,只播报状态和已用时间,不要翻历史、不要猜进度,可以再调本工具;aborted/error 看 stopReason 和 error,并说清结果与下一步。任务已经结束后再调仍然能取到本轮回复。replyUnavailable=true 只是没读到回复,可改用 oc_last 查看。任何时候都不要因为本工具重复下发任务。

oc_lastA

读取指定 agent 的 glasses 会话最近 limit 条消息(默认 10,最大 50),返回最后一条 assistant 回复和 voice 播报元数据。用于 runId 丢失、桥接进程重启、或需要确认“刚才那个任务”说了什么。只播报最后一条 assistant 的内容概要,不要把历史逐条读出来。它只反映历史,不代表任务当前是否在运行——查状态请用 oc_wait;手上没有 runId 时也不要据此断言“还在跑”或“已完成”。

oc_cancelA

取消 runId 对应的任务,成功返回 status=aborted。只有用户明确说要停掉/取消时才调用,成功后用一句话确认,不要念底层字段。Gateway 上已无活动任务时视为幂等成功(no-active-run),并释放本桥接的会话锁——因此任务长时间悬挂在 running、或 SESSION_BUSY 挡住新任务时,取消它是最可靠的恢复手段。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.5/5.0

Scored across 5 tools

Disambiguation5/5

Each tool owns a distinct phase of the lifecycle: oc_agents discovers targets, oc_run dispatches, oc_wait polls a known runId, oc_last recovers history without a runId, and oc_cancel aborts. The descriptions explicitly pre-empt the likely confusions (wait vs. last, running vs. history) and state when not to use each tool.

Naming Consistency4/5

All tools share a consistent oc_ prefix and snake_case, which makes the family instantly recognizable. The only minor deviation is that oc_agents is a plural noun while the rest are verbs (run/wait/last/cancel), but this is readable and predictable.

Tool Count5/5

Five tools is tight and well-scoped for a bridge to a local agent gateway; every tool covers a non-redundant operation with no filler. Nothing suggests a missing sibling or an over-stuffed surface.

Completeness4/5

The dispatch lifecycle — discover agents, run, poll, recover history, cancel — is fully covered, including recovery paths for lost runIds and stuck sessions. Minor gaps remain: there is no tool to enumerate active runs across agents or to check gateway/health status other than error codes like GATEWAY_UNAVAILABLE.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues