mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-11 12:10:45 +08:00
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
67 lines
1.8 KiB
Markdown
67 lines
1.8 KiB
Markdown
# MCP plugin-tools call
|
|
|
|
```yaml qa-scenario
|
|
id: mcp-plugin-tools-call
|
|
title: MCP plugin-tools call
|
|
surface: mcp
|
|
coverage:
|
|
primary:
|
|
- plugins.mcp-tools
|
|
secondary:
|
|
- tools.invocation
|
|
objective: Verify OpenClaw can expose plugin tools over MCP and a real MCP client can call one successfully.
|
|
successCriteria:
|
|
- Plugin tools MCP server lists memory_search.
|
|
- A real MCP client calls memory_search successfully.
|
|
- The returned MCP payload includes the expected memory-only fact.
|
|
docsRefs:
|
|
- docs/cli/mcp.md
|
|
- docs/gateway/protocol.md
|
|
codeRefs:
|
|
- src/mcp/plugin-tools-serve.ts
|
|
- extensions/qa-lab/src/suite.ts
|
|
execution:
|
|
kind: flow
|
|
summary: Verify OpenClaw can expose plugin tools over MCP and a real MCP client can call one successfully.
|
|
config:
|
|
memoryFact: "MCP fact: the codename is ORBIT-9."
|
|
query: "ORBIT-9 codename"
|
|
expectedNeedle: "ORBIT-9"
|
|
```
|
|
|
|
```yaml qa-flow
|
|
steps:
|
|
- name: serves and calls memory_search over MCP
|
|
actions:
|
|
- call: fs.writeFile
|
|
args:
|
|
- expr: "path.join(env.gateway.workspaceDir, 'MEMORY.md')"
|
|
- expr: "`${config.memoryFact}\\n`"
|
|
- utf8
|
|
- call: forceMemoryIndex
|
|
args:
|
|
- env:
|
|
ref: env
|
|
query:
|
|
expr: config.query
|
|
expectedNeedle:
|
|
expr: config.expectedNeedle
|
|
- call: callPluginToolsMcp
|
|
saveAs: result
|
|
args:
|
|
- env:
|
|
ref: env
|
|
toolName: memory_search
|
|
args:
|
|
query:
|
|
expr: config.query
|
|
maxResults: 3
|
|
- set: text
|
|
value:
|
|
expr: "JSON.stringify(result.content ?? [])"
|
|
- assert:
|
|
expr: "text.includes(config.expectedNeedle)"
|
|
message:
|
|
expr: "`MCP memory_search missed expected fact: ${text}`"
|
|
detailsExpr: text
|
|
```
|