Repository navigation
feat: call 命令支持 --raw 和 --json 参数选项 - #22
Merged
Merged
Conversation
新增功能: - 添加 --raw 选项,禁用自动 JSON 解析,所有值作为字符串处理 - 添加 --json 选项,支持从 JSON 文件加载参数 - 更新帮助文档和示例 使用示例: mcps call server tool --raw id="123" name="Alice" mcps call server tool --json params.json Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- 强调必须在 feature 分支开发,禁止直接在 main 分支提交 - 强调必须使用 npm version 命令更新版本号 - 添加常见错误修复指南(误提交到 main 的处理方法) - 完善 PR 流程检查清单 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新增功能
使用示例
--raw 模式
call 命令默认会自动将参数值解析为 JSON(数字、布尔值、对象等)。使用 --raw 可以禁用此行为,将所有值作为原始字符串处理:
```bash
mcps call alibaba-dms createDataChangeOrder --raw
database_id="36005357"
script="DELETE FROM ..."
logic=true
```
--json 模式
对于复杂参数,可以从 JSON 文件加载:
```bash
mcps call my-server createUser --json params.json
```
解决的问题
解决了参数值被意外转换为非字符串类型的问题(如 `"123"` 被解析为数字 123)。
文档更新
Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com