Skip to content

fix: call command outputs raw text content instead of MCP envelope#30

Merged
philschmid merged 1 commit intomainfrom
fix/call-output-format-issue-25
Feb 5, 2026
Merged

fix: call command outputs raw text content instead of MCP envelope#30
philschmid merged 1 commit intomainfrom
fix/call-output-format-issue-25

Conversation

@philschmid
Copy link
Owner

Fixes #25

Problem

The call command was outputting the full MCP protocol envelope:

{ "content": [{ "type": "text", "text": "..." }] }

This made it hard to pipe output to jq, grep, head, etc. without extracting .content[0].text.

Solution

Now outputs raw text content directly, restoring the v0.1.4 behavior.

Changes

  • Use existing formatToolResult helper in call.ts
  • Update SKILL.md examples (remove jq extraction patterns)
  • Update CHANGELOG.md to reflect correct behavior
  • Add e2e test to prevent regression

Before/After

# Before (v0.3.0)
$ mcp-cli call server/tool '{}'
{ "content": [{ "type": "text", "text": "[...]" }] }

# After
$ mcp-cli call server/tool '{}'
[...]  # Raw text, directly pipeable

Fixes #25

The call command was outputting the full MCP protocol envelope:
  { "content": [{ "type": "text", "text": "..." }] }

Now outputs raw text content directly, making it easier to pipe to
grep, head, jq, and other CLI tools without needing .content[0].text.

Changes:
- Use existing formatToolResult helper in call.ts
- Update SKILL.md examples (remove jq extraction patterns)
- Update CHANGELOG.md to reflect correct behavior
- Add e2e test to prevent regression
@philschmid philschmid merged commit d77672a into main Feb 5, 2026
2 checks passed
@philschmid philschmid deleted the fix/call-output-format-issue-25 branch February 5, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

call output format changed in v0.3.0 — intentional?

1 participant