MiniMax CLI Web Search
Use this skill to run web search through MiniMax MCP from CLI, then return clean, source-first results.
Phase 1: Environment Preparation (must run first)
1) Preflight checks
Run:
CODEBLOCK0
This verifies:
- -
mcporter exists - MiniMax MCP server is discoverable (
mcporter list --json) - Server status is healthy (
name=minimax, status=ok)
2) If preflight fails, repair by failure type
- Install/setup mcporter in PATH.
- Check
config/mcporter.json includes minimax server.
- Verify command/transport is valid.
- - Auth/API-key related errors
- Ensure MiniMax API key is configured for the minimax MCP server.
- Re-run preflight.
3) Initiate / smoke test
Run one query after preflight passes:
CODEBLOCK1
If this returns results, environment is ready.
Phase 2: Search Usage (runtime)
Quick usage
CODEBLOCK2
Supported options
- -
--query <text>: required search query - INLINECODE8 : max printed results (default
5) - INLINECODE10 : freshness hint appended to query (optional)
- INLINECODE11 : normalized JSON output
- INLINECODE12 : raw tool JSON output
- INLINECODE13 : command timeout (default
35)
Output contract (default text)
- - Show top-N results in order
- For each item: title, URL, snippet, date (when available)
- Keep output concise and directly actionable
Agent behavior guideline
- 1. Start with a focused query (3–7 keywords).
- If low quality, rephrase once with narrower terms.
- Return key findings + links (no table required).
- For time-sensitive asks, include time words in query (e.g.,
today, latest, date).
Error model (for reliable automation)
Script exit codes:
- -
0: success - INLINECODE18 : argument error
- INLINECODE19 : dependency missing (
mcporter/python3) - INLINECODE22 : config/auth issue (MCP server unavailable, API key/auth problems)
- INLINECODE23 : upstream/runtime/network failure
- INLINECODE24 : no results (non-fatal)
Treat code 6 as a normal “no match” outcome, not a crash.
Risks and handling
- 1. CLI/config drift across machines
- Use
--preflight before first use in a new environment.
- 2. API key exposure risk
- Never print key values; report only missing/invalid status.
- 3. Temporary file safety
- Wrapper uses
mktemp for stderr/output temp files and cleans them with
trap.
- 3. Upstream response variance
- Use
--json normalized output for downstream automation.
- 4. Timeout/network instability
- Increase
--timeout and retry with narrower query/count.
- 5. Weak relevance
- Rephrase query, add concrete entities/time ranges.
Additional reference
- - For setup/verification commands and publish readiness checks, read:
- INLINECODE31
Reference style
When presenting findings, include direct links for verification. Prefer 3–5 high-signal sources over large dumps.
MiniMax CLI 网络搜索
使用此技能通过 CLI 运行 MiniMax MCP 网络搜索,然后返回干净、以来源优先的结果。
第一阶段:环境准备(必须先运行)
1) 预检检查
运行:
bash
scripts/minimaxwebsearch.sh --preflight
这将验证:
- - mcporter 存在
- MiniMax MCP 服务器可发现(mcporter list --json)
- 服务器状态健康(name=minimax,status=ok)
2) 如果预检失败,按失败类型修复
- 在 PATH 中安装/设置 mcporter。
- 检查 config/mcporter.json 是否包含 minimax 服务器。
- 验证命令/传输是否有效。
- 确保 MiniMax API 密钥已为 minimax MCP 服务器配置。
- 重新运行预检。
3) 启动/冒烟测试
预检通过后运行一次查询:
bash
scripts/minimaxwebsearch.sh --query 最新的 OpenClaw 版本 --count 3
如果返回结果,则环境已就绪。
第二阶段:搜索使用(运行时)
快速使用
bash
scripts/minimaxwebsearch.sh --query 你的查询 --count 5
支持的选项
- - --query <文本>:必需的搜索查询
- --count :最大打印结果数(默认 5)
- --freshness <值>:附加到查询的新鲜度提示(可选)
- --json:标准化的 JSON 输出
- --raw:原始工具 JSON 输出
- --timeout <秒>:命令超时时间(默认 35)
输出约定(默认文本)
- - 按顺序显示前 N 个结果
- 每个项目:标题、URL、摘要、日期(如有)
- 保持输出简洁且可直接使用
代理行为指南
- 1. 从聚焦的查询开始(3–7 个关键词)。
- 如果质量低,用更窄的术语重新表述一次。
- 返回关键发现 + 链接(无需表格)。
- 对于时间敏感的问题,在查询中包含时间词(例如 今天、最新、日期)。
错误模型(用于可靠自动化)
脚本退出代码:
- - 0:成功
- 2:参数错误
- 3:缺少依赖(mcporter/python3)
- 4:配置/认证问题(MCP 服务器不可用,API 密钥/认证问题)
- 5:上游/运行时/网络故障
- 6:无结果(非致命)
将代码 6 视为正常的“无匹配”结果,而非崩溃。
风险与处理
- 1. 跨机器的 CLI/配置漂移
- 在新环境中首次使用前运行 --preflight。
- 2. API 密钥暴露风险
- 绝不打印密钥值;仅报告缺失/无效状态。
- 3. 临时文件安全性
- 包装器使用 mktemp 创建 stderr/输出临时文件,并使用 trap 清理。
- 4. 上游响应变化
- 对下游自动化使用 --json 标准化输出。
- 5. 超时/网络不稳定
- 增加 --timeout 并使用更窄的查询/计数重试。
- 6. 相关性弱
- 重新表述查询,添加具体实体/时间范围。
额外参考
- references/environment-checklist.md
参考风格
呈现发现时,包含直接链接以供验证。优先选择 3–5 个高信号来源,而非大量数据转储。