codebuddy-matrix-channel
codebuddy-matrix-channel
Matrix 채팅을 CodeBuddy Code 로컬 세션의 **Channel 플러그인(MCP 서버)**에 연결합니다.
효과는 CodeBuddy에 내장된 Telegram / Discord / WeChat channel과 동일합니다:
Matrix 방에서 메시지 전송 →
#matrix · @alice:matrix.org: 안녕하세요형태로 CodeBuddy 세션에 표시CodeBuddy의 답변은
reply도구를 통해 Matrix 방으로 전송선택 사항: CodeBuddy의 권한 요청 프롬프트를 "컨트롤 룸"으로 전달하여, 휴대폰에서 도구 호출을 승인/거부
이 플러그인은 CodeBuddy의 Channel 확장 메커니즘(docs/cn/cli/channels.md 및 channels-reference.md 참조)을 기반으로 하며, CodeBuddy 본체를 수정할 필요가 없습니다.
1. 작동 원리
Matrix 房间 ──(matrix-js-sdk 收消息)──▶ matrix-channel (本插件)
│ notifications/claude/channel
▼
CodeBuddy Code 会话
│ reply 工具 / 权限请求
▼
matrix-channel ──(sendText)──▶ Matrix 房间플러그인은 CodeBuddy가 stdio로 시작하는 하위 프로세스로 실행되며, MCP 프로토콜로 통신합니다.
Related MCP server: mcacp
2. 설치
cd matrix-channel
npm install
npm run build # 编译到 dist/(也可直接用 tsx 运行,无需构建)실행 환경은 Node >= 20이 필요합니다.
2.1 빠른 시작(디지털 아바타)
설치 / 컴파일
cd matrix-channel && npm install && npm run build.env작성(최소 구성, 자세한 내용은 3절 참조)MATRIX_HOMESERVER=https://im.yiq.pub MATRIX_ACCESS_TOKEN=<从 Element:设置 → 帮助 → 高级 → 访问令牌 复制> MATRIX_USER_ID=@evlon-ai:im.yiq.pub MATRIX_ALLOWLIST=@evlon:im.yiq.pub # 防 prompt 注入,必填 MATRIX_OWNER_ID=@evlon:im.yiq.pub # 分身管理者=你,审批权只认此身份 MATRIX_CONTROL_ROOM_ID=!<控制室房间ID>:im.yiq.pub MATRIX_MENTION_REQUIRED=true # 群里只响应 @分身 # 可选:MATRIX_TRUSTED_SENDERS / MATRIX_TRUSTED_ROOMS / MATRIX_AUTHORIZED_WORK자체 점검(
.env를 수정할 때마다 먼저 실행)npm run doctor # 期望:连接 ✅、账号 ✅、E2EE ✅CodeBuddy 연결: 프로젝트
.mcp.json에 등록(절대 경로) 후 시작codebuddy --channels server:matrix --dangerously-load-development-channels일상 사용
그룹에서 @아바타로 작업 지시 → 신뢰할 수 있는 출처/승인된 작업은 자동 실행, 낯선 작업은 먼저 계획을 세우고 컨트롤 룸에서
approve를 기다립니다.고위험 도구(Bash/파일 쓰기 등)는 항상 컨트롤 룸에서 승인을 요청합니다.
컨트롤 룸에서 명령(
MATRIX_OWNER_ID만 인식):approve(run/go, 방 ID를 붙일 수 있음) → 해당 방의 작업 승인yes <id>/no <id>→ 대기 중인 고위험 권한 요청 승인 / 거부
암호화 그룹은
MATRIX_E2EE=true필요;MATRIX_DEVICE_ID를 비워두면/devices에서 자동 선택, 오류가 발생하면 "설정 → 기기"의 기기 ID를 입력하세요.
3. 설정
.env.example을 .env로 복사하고 작성:
cp .env.example .env변수 | 설명 |
| 홈 서버 주소, 예: |
| 계정 access_token(권장; Element "설정 → 도움말"에서 복사) |
| 선택 사항, "자신의 메시지"를 식별하는 데 사용, 예: |
| 대체 인증 방식, 시작 시 |
| 메시지를 보낼 수 있는 발신자 사용자 ID, 쉼표로 구분(반드시 설정) |
| 수신할 방 ID, 쉼표로 구분(비워두면 = 전체) |
| 권한 중계 컨트롤 룸 방 ID(선택 사항, 디지털 아바타 모드에서는 필수) |
| 아바타 관리자(owner)의 Matrix 사용자 ID(필수). 승인 권한은 이 신원만 인식 |
| 신뢰할 수 있는 동료 사용자 ID, 쉼표로 구분; 이들의 작업은 자동 실행(안전한 도구) |
| 신뢰할 수 있는 그룹 ID, 쉼표로 구분; 이 방의 모든 작업은 자동 실행 |
| 승인된 일반 작업 설명(자유 텍스트), 아바타가 "일반 vs 낯선"을 판단하는 데 사용 |
| 그룹에서 @멘션된 메시지에만 응답할지 여부(기본 true; 여러 아바타 공존 시 권장) |
| 고위험 도구 목록, 쉼표로 구분; 기본 |
| 이미지/파일을 로컬에 다운로드하고 |
| 미디어 다운로드 디렉터리(기본 |
| 종단 간 암호화 활성화 여부(기본 false, 아래 6절 참조) |
| matrix-js-sdk 42.x에서 효과 없음(6절 참조): Rust crypto는 wasm + |
⚠️ 보안:
MATRIX_ALLOWLIST를 반드시 설정하세요(방이 아닌 발신자 기준으로 검증, 그룹 채팅에서 임의 멤버의 세션 주입 방지). 비워두면 모든 사용자 허용, 로컬 테스트 전용입니다.
4. CodeBuddy 연결
방법 A: 개발 기간(마켓 화이트리스트 우회)
이 플러그인을 CodeBuddy 프로젝트 .mcp.json에 등록:
{
"mcpServers": {
"matrix": {
"command": "npx",
"args": ["tsx", "/绝对路径/matrix-channel/src/index.ts"]
}
}
}그런 다음 CodeBuddy 시작:
codebuddy --channels server:matrix --dangerously-load-development-channels컴파일 후
node로 실행하려면:"args": ["node", "/绝对路径/matrix-channel/dist/index.js"]
방법 B: 플러그인으로 패키징(공식 마켓에 제출 후)
npm run build그런 다음 codebuddy-matrix-channel을 플러그인으로 게시하고, 이후에는:
codebuddy --channels plugin:matrix-channel@<你的市场>5. 사용
시작 후, 허용된 Matrix 방에서 메시지를 보내면 CodeBuddy 세션에
#matrix · @당신: ...이 표시됩니다.CodeBuddy가 처리를 완료하면 답변이 Matrix 방에 표시됩니다.
MATRIX_CONTROL_ROOM_ID를 설정한 경우: CodeBuddy가 승인이 필요한 도구(Bash / Write 등)를 호출하면 컨트롤 룸에 알림이 전송됩니다(m.notice시스템 알림으로 전송, 읽지 않음/알림 트리거 없음).yes <id>로 허용 /no <id>로 거부
reply 도구 매개변수
매개변수 | 설명 |
| Matrix 방 ID(세션의 메시지 태그에서 |
| 보낼 텍스트 |
| 선택 사항, HTML 본문( |
| 선택 사항, |
예: CodeBuddy가
m.notice로 상태 알림을 보내도록 하려면:reply({ chat_id: "!abc:server", text: "처리 완료", msgtype: "m.notice" }).
health_check 도구
CodeBuddy 세션에서 직접 호출하거나 /mcp 건강 검사에서 트리거할 수 있으며, npm run doctor의 연결성/E2EE 부분과 동일합니다. JSON 반환:
{ "ok": true, "userId": "@alice:matrix.org", "e2ee": true, "cryptoReady": true }ok=false일 때 error 필드에 실패 원인(연결/인증/E2EE 초기화)이 포함됩니다.
6. 제한 사항 및 주의 사항
종단 간 암호화(E2EE) 방: 기본적으로 암호화되지 않은 방만 지원합니다. 암호화된 방을 연결하려면
MATRIX_E2EE=true로 설정하면, 플러그인이 matrix-js-sdk 내장 Rust crypto(initRustCrypto)를 재사용하여 SDK가 "수신 시 복호화, 전송 시 암호화"를 자동으로 처리합니다. 암호화 프로토콜을 직접 구현할 필요가 없습니다. 활성화 후:암호화된 메시지는
m.room.encrypted로 도착하고, SDK가 복호화(Event.decrypted)를 완료하면 실제 유형으로 변경된 후 플러그인이 세션에 전달합니다.암호화된 방으로 보내는 답변은 SDK가 자동으로 암호화합니다.
키 저장(중요, 버전 관련): matrix-js-sdk 42.x에서 Rust crypto 백엔드는 wasm/IndexedDB 구현(
@matrix-org/matrix-sdk-crypto-wasm)만 있으며, Node 네이티브 백엔드가 없습니다. Node에서 실행하기 위해 플러그인은 시작 시fake-indexeddb/auto로 Node에 전역indexedDB폴리필을 주입합니다. 이 폴리필은 순수 메모리이므로:키는 실제로 프로세스 메모리에만 존재하며,
MATRIX_CRYPTO_DB는 이 버전에서 실제 SQLite 파일을 생성하지 않습니다. 프로세스를 다시 시작하면 키를 다시 협상해야 합니다(송수신에는 영향 없음, 키 전달/기기 검증만 다시 수행).실제 디스크 영속화는
@matrix-org/matrix-sdk-crypto-nodejs네이티브 백엔드가 포함된 matrix-js-sdk 버전으로 업그레이드하거나, 향후 nodejs 엔트리를 지원하는 버전(그때fake-indexeddb폴리필을 제거하고 네이티브 백엔드로 전환)이 필요합니다.참고: 의존성에 이미 설치된
@matrix-org/matrix-sdk-crypto-nodejs는 현재 42.2.0에서 SDK가 호출하지 않으며, 향후 업그레이드를 위한 대비책일 뿐입니다. 현재 암호화 핵심은 wasm +fake-indexeddb메모리 폴리필로 작동합니다.
새 기기가 암호화된 방에 처음 들어갈 때, Matrix 클라이언트에서 이 bot의 기기를 검증하는 것이 좋습니다(그렇지 않으면 상대방이 "검증되지 않은 기기" 알림을 볼 수 있지만, 메시지는 정상적으로 송수신됩니다).
미디어: 기본적으로 메시지 텍스트만 세션에 연결합니다.
MATRIX_DOWNLOAD_MEDIA를 활성화하면 이미지/파일을 로컬에 다운로드하고[file: 경로]로 주입하여 Agent가 읽을 수 있게 합니다.권한 중계는 CodeBuddy의
claude/channel/permission기능에 의존합니다. CodeBuddy 버전이 지원하지 않으면 핵심 채팅 연결에는 영향이 없습니다.
7. 디지털 아바타: 관리자 승인 모델(핵심 시나리오)
아바타를 "그룹의 동료"로 취급하여, 자유롭게 @로 작업을 지시할 수 있지만 관리자가 승인하기 전에는 실제로 아무것도 변경하지 않습니다.
시나리오
동료가 여러 그룹(예:
#프로젝트A,#고객센터)을 만들고, 그룹에 여러 아바타 bot이 있을 수 있습니다. 동료가 그룹에서 @당신의 아바타로 작업을 지시합니다. @멘션된 경우에만 응답(직접 DM은 항상 응답).작업 지시 수신 후:
일반 / 승인된 작업(사전 설정된
MATRIX_TRUSTED_SENDERS/MATRIX_TRUSTED_ROOMS출처, 또는MATRIX_AUTHORIZED_WORK설명 범위에 속함) → 자동 실행(안전한 도구).낯선 작업(승인 범위 밖) → 아바타가 먼저 계획을 세우고,
request_approval을 호출하여 컨트롤 룸으로 에스컬레이션합니다.approve로 응답해야 실행합니다.고위험 작업(
MATRIX_HIGH_RISK_TOOLS, 예: Bash / 파일 쓰기) → 출처와 관계없이 항상 승인 요청.
아키텍처 계층
MCP 플러그인 = 안전한 전송 + 하드 게이트(코드로 강제, 모델 신뢰 안 함):
@필터, 권한 판정allow/deny는 검증 가능한 사실(owner 여부, 신뢰할 수 있는 출처 여부, 고위험 도구 여부)만 기준으로 하며, 컨트롤 룸 승인은MATRIX_OWNER_ID만 인식합니다.SKILL = 정책 두뇌(의미 판단, Agent에 위임):
skills/matrix-avatar/SKILL.md는 아바타가 "일반 vs 낯선"을 판단하도록 안내하며, 낯선 경우 계획 모드로 전환하고request_approval을 호출합니다. Agent는 승인만 요청하고 스스로 승인하지 않습니다. 승인은 "관리자의 신뢰할 수 있는 출처 사전 설정" 또는 "관리자approve"에서만 나옵니다.
플러그인 내장 channel
instructions에 이 정책이 인라인되어 있으므로, SKILL을 추가로 설치하지 않아도 작동합니다.skills/matrix-avatar/SKILL.md는 CodeBuddy에서 재사용/미세 조정할 수 있도록 제공됩니다.
3단계 작업 상태(방별)
상태 | 의미 | 안전한 도구 | 고위험 도구 |
| 신뢰할 수 있는 출처 / | 자동 실행 | 관리자 승인 요청(컨트롤 룸 |
| 승인 대기로 에스컬레이션됨( | 차단 | 차단 |
| 낯선 출처, 미승인 | 차단 | 차단(및 |
컨트롤 룸 명령(관리자 MATRIX_OWNER_ID만 유효)
approve(또는run/go, 선택적으로 방 ID, 예:approve !projectA:server) → 해당 방의 현재 작업 승인, 아바타가 실행 시작.yes <id>/no <id>→ 대기 중인 고위험 권한 요청 승인 / 거부.다른 사람의 컨트롤 룸 응답은 무시됩니다.
설정 예시(.env)
MATRIX_OWNER_ID=@you:matrix.org
MATRIX_TRUSTED_SENDERS=@alice:matrix.org,@bob:matrix.org
MATRIX_TRUSTED_ROOMS=!projectA:server
MATRIX_AUTHORIZED_WORK=回答产品问题、总结会议纪要、起草文档
MATRIX_MENTION_REQUIRED=true
MATRIX_HIGH_RISK_TOOLS=Bash,Write,Edit,MultiEdit,NotebookEdit8. 자체 점검(doctor)
.env를 작성한 후, CodeBuddy를 시작하기 전에 자체 점검을 실행하여 설정, 연결성, E2EE 상태를 확인할 수 있습니다:
npm run doctor자체 점검은 현재 설정(token 마스킹), homeserver 연결 가능 여부와 자격 증명 유효성을 확인하고, MATRIX_E2EE=true일 때 Rust crypto 초기화를 시도합니다. 항목이 실패하면 명확한 원인을 출력하고 0이 아닌 종료 코드로 종료합니다.
9. 디렉터리 구조
matrix-channel/
├── src/
│ ├── config.ts # 环境变量 / 白名单 / 授权配置读取与校验
│ ├── matrix.ts # Matrix 客户端封装(连接、@提及过滤、收/发、下载媒体、E2EE、自检)
│ ├── index.ts # MCP 服务:channel 通知、授权硬闸、reply / request_approval 工具、控制室审批
│ └── doctor.ts # `npm run doctor` 自检入口
├── skills/
│ └── matrix-avatar/
│ └── SKILL.md # 分身行为策略(语义判断:常用 vs 陌生)
├── package.json
├── tsconfig.json
├── .gitignore
├── .env.example
└── README.mdAvailable Tools
6 toolshealth_checkA
运行连接/E2EE 自检(等价于 npm run doctor),返回 Matrix 连接与加密状态。可在 /mcp 健康检查中调用。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool performs a diagnostic self-check and returns connection and encryption status, which implies a read-only probe. It does not explicitly say it has no side effects, but the self-check framing makes the behavior sufficiently transparent for a zero-parameter tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one compact sentence that front-loads the action and scope, then adds the return value and invocation context. Every clause earns its place; there is no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple zero-parameter diagnostic tool with no output schema, the description covers purpose, method, return value, and invocation context. Nothing essential is missing for an agent to select and call the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters and schema description coverage is 100%, so there is nothing for the description to clarify. Baseline for zero parameters is 4, and the description adds no conflicting or misleading parameter information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: it runs a connection/E2EE self-check equivalent to 'npm run doctor' and returns Matrix connection and encryption status. It also distinguishes this health-check tool from the messaging/approval-oriented sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives clear usage context by stating it can be invoked during /mcp health checks and is for checking connection/encryption status. It does not explicitly name when-not-to-use conditions, but the sibling tools are clearly different in purpose, so the distinction is implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_roomsA
列出本分身已加入的所有 Matrix 房间(room_id + 标题),用于了解「我在哪些房间 / 群」。当不知道该回哪个房间时,可据此找到与管理者(owner)的私聊房间。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and discloses the scope (only rooms the avatar has joined) and the output content (room_id + title). For a read-only, zero-parameter listing tool this is adequate, though it omits minor traits like ordering, pagination, and whether the owner room is guaranteed to exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with zero filler. The first sentence front-loads the core purpose and output fields; the second adds a practical decision aid without repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 0-parameter list tool with no output schema, the description covers what is listed, what fields come back, and when to use it. Minor gaps (e.g., behavior when no rooms exist, pagination) are low-stakes for a read-only listing, so nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so schema coverage is trivially 100% and there is nothing to document. The baseline of 4 applies because no parameter semantics are needed; the description appropriately spends its effort on output and scope instead.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb (列出/list) and resource (all Matrix rooms this avatar has joined), and explicitly states the returned fields (room_id + title). The scope '本分身已加入' clearly separates it from per-room siblings like room_info and room_members, so an agent can tell them apart without opening another schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides a concrete usage scenario: when unsure which room to reply to, use this tool to locate the owner's private chat room. It does not, however, name alternatives or state when not to use it (e.g., room_info for a single room's details), so it lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
replyA
通过 Matrix 把回复发送到指定房间(chat_id)。省略 chat_id 时回复发往最近一次转发进来的房间(原路返回)。发送会按配置自动重试;若多次仍发不回来源房间,则改用默认回复(MATRIX_DEFAULT_REPLY)发往控制室/owner 私聊兜底。
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | 可选,HTML 格式正文(与 text 同时发送) | |
| text | Yes | 要发送的文本 | |
| chat_id | No | Matrix 房间 ID,例如 !abc:server。省略时回复发往最近一次转发进来的房间。 | |
| msgtype | No | 消息类型:m.text 普通消息;m.notice 系统提示(不触发未读/提醒) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
没有 annotations,因此描述承担了全部行为披露责任。描述主动说明了自动重试机制、失败后的默认回复兜底行为(发往控制室/owner 私聊),以及原路返回的逻辑,这些都是非显而易见的关键行为。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
描述短小精悍,三句话分别说明核心操作、chat_id 省略行为和重试/兜底机制,信息密度高且没有冗余。关键行为前置,结构清晰。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
对于发送消息类工具,描述配合完整 schema 已覆盖调用所需信息:目标房间、默认回退行为、重试和失败兜底。没有输出 schema 也不影响理解,整体上下文完整。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema 描述覆盖率为 100%,所有参数在 schema 中已有说明。描述额外强调了 chat_id 省略时的行为,但 schema 中同样包含该信息,因此描述在参数语义上未显著超出 schema 提供的价值。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
描述明确说明该工具通过 Matrix 发送回复到指定房间,并解释了省略 chat_id 时的原路返回行为。动词和资源都很具体,与 list_rooms、room_info 等只读查询类兄弟工具形成清晰区分。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
描述清晰说明了何时使用该工具(发送回复)以及省略 chat_id 时的行为,但未明确提及何时不应使用或列举替代工具。整体使用场景清楚,只是缺少显式的排他性说明。
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_approvalA
当判断当前任务来自陌生来源或含高风险时调用,把任务升级到管理者控制室等待审批。管理者回复 approve 后任务会被重放并执行。
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | 需要审批的原因/计划摘要 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that the task is escalated, that it waits for approval, and that it will be replayed and executed after the manager replies 'approve'. It does not mention rejection behavior, but the core lifecycle is clearly disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one concise sentence that front-loads the trigger condition, then states the action and outcome. Every part is informative and there is no redundant wording.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with a single required parameter and no output schema, the description covers the key context: when to call, what happens, and what triggers execution. It does not specify behavior on rejection, but the overall guidance is sufficient for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already covers the single parameter 'reason' with 100% coverage, including its meaning as the approval reason or plan summary. The description adds no further parameter-level detail, 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.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies a specific action: escalating the current task to a manager control room for approval. It also gives the triggering condition ('unfamiliar source or high risk'), which distinguishes it from the sibling tools like reply, health_check, and list_rooms.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool: when the task is from an unfamiliar source or carries high risk. It does not explicitly list alternatives or exclusions, but the condition is clear enough that an agent can decide appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
room_infoA
获取指定 Matrix 房间(群/私聊)的可读信息:名称、主题、成员昵称与 ID。用于配置与检查「房间 ID ↔ 名称」映射。chat_id 省略时取最近一次转发进来的房间。
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | No | Matrix 房间 ID,例如 !abc:server。省略时取最近对话房间。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the behavioral disclosure burden. It does disclose that the operation retrieves readable info and defines the default behavior when chat_id is omitted, which is useful. However, it does not explicitly state that the operation has no side effects, what happens on invalid room IDs, or any permission requirements — gaps that matter for a tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler. The first sentence states the tool's purpose and outputs, the second gives the use case and default behavior. Critical information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple getter with one optional parameter, the description is mostly complete: it lists return fields, the use case, and the fallback behavior. Since there is no output schema, describing the expected fields is important and done here. Minor omissions around error/not-found behavior prevent a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 value beyond the schema by clarifying that 'recent conversation' specifically means the most recently forwarded room, and by explaining why chat_id is optional in terms of the mapping use case.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies a clear verb ('获取' / get) and resource ('指定 Matrix 房间'), and lists the exact data returned (name, topic, member nicknames and IDs). It does not explicitly contrast itself with siblings such as list_rooms or room_members, but the resource scope and output fields are specific enough to distinguish it without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states a concrete use case: configuring and checking the 'room ID ↔ name' mapping. It also explains the optional chat_id behavior (fallback to the most recently forwarded room), which guides when to call the tool without an argument. No alternatives or when-not-to-use conditions are mentioned, hence not a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
room_membersA
获取指定 Matrix 房间(群聊)的在场成员列表,返回每个成员的 user_id 与 display_name,用于了解「谁在场」。chat_id 省略时取最近一次转发进来的房间。
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | No | Matrix 房间 ID,例如 !abc:server。省略时取最近对话房间。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
无 annotations,描述承担行为说明职责。它说明了工具是只读查询、返回成员列表并解释 chat_id 缺省行为,但未披露任何可能的权限要求、失败情形或数据即时性等行为特征。
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
两句话完整说明用途、返回值与缺省行为,信息密度高且无冗余,属于精炼的合格描述。
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
对单参数只读列表工具,描述已说明返回字段、缺省行为和使用场景;缺少输出结构样例或错误条件,但整体足以让 agent 正确调用。
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
参数仅有 chat_id,schema 已包含描述;描述额外说明了省略 chat_id 时的默认行为(取最近对话房间),为参数语义增加了超出 schema 的价值。
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
描述使用明确动词「获取」与资源「指定 Matrix 房间(群聊)的在场成员列表」,并具体说明返回 user_id 与 display_name,足以与 siblings 如 list_rooms、room_info 区分。
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
描述说明 chat_id 省略时取最近转发进来的房间,提供了明确的使用上下文;但未明确说明何时不使用本工具(例如需要房间详情时用 room_info),因此未达满分。
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.
6 tool updates
v0.1.0- First observed
health_check - First observed
list_rooms - First observed
reply - First observed
request_approval - First observed
room_info - First observed
room_members
TDQS
Scored across 6 tools
The tools are mostly distinct: reply, health_check, request_approval, list_rooms, room_members, and room_info each target a different action or resource. The only mild overlap is between room_info and room_members, since room_info also includes member names/IDs, but the descriptions are clear enough to guide selection.
All names are lowercase snake_case, but the semantic pattern is mixed: reply is a bare verb, list_rooms and request_approval are verb+noun, while room_members and room_info are noun+noun descriptors. This is readable but not consistently a verb_noun convention.
Six tools is a tight, well-scoped set for a Matrix channel bridge. Each tool supports a distinct part of the workflow—responding, verifying health, escalating approval, and discovering rooms and participants—without redundancy or bloat.
The set covers the core bot workflow on a Matrix channel: replying, understanding room context, checking connection health, and handling approval escalation. Minor gaps like joining/leaving rooms or reading message history exist, but they are outside the apparent core purpose and do not create dead ends.
Maintenance
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
BridgeApp workspace over MCP: tasks, chats, threads, pages, and projects.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Discover MCP servers and A2A agents; verify, message, post, follow, react, and receive webhooks.
Related MCP Servers
- AlicenseAqualityCmaintenanceBridges OpenAI Codex CLI to any MCP client, allowing headless Codex sessions via tools like codex and codex-reply.215 npm1MIT
- AlicenseAqualityDmaintenanceBridges any MCP client (like Claude Code, Zed, VS Code) to any ACP coding agent, enabling multi-agent orchestration from a single chat interface.24126 npm11Apache 2.0
- AlicenseNot gradedqualityDmaintenanceBridges a Matrix room with Claude Code's claude/channel feature, enabling chat from Matrix to interact with a running Claude Code session.GPL 3.0
- AlicenseNot gradedqualityCmaintenanceMCP server for Matrix that lets Claude list rooms, search/read messages, send messages and files, react, create rooms, and invite users, with multi-homeserver support and safe-by-default writes; no end-to-end encryption.MIT