#2431·inspector

CLI has no way to export/save a tool call result to a file

Author: CloneOfAlexCreated Sep 18, 2026Updated Sep 18, 2026
Labelsenhancementv2

Which client?

CLI

The problem

When running mcp-inspector --cli to call a tool, the only way to get the result out is to eyeball terminal output or manually pipe/redirect stdout. There's no structured --output <file> flag, and no format selection (raw vs. pretty JSON) the way the web client's ToolResultPanel export offers (clients/web/src/components/groups/ToolResultPanel/ToolResultPanel.tsx + toolResultUtils.ts). The TUI has the same gap on its result view -- no keybinding to write the currently-displayed result to a file.

This makes it awkward to script comparisons or archive results from CLI/TUI sessions, whereas the same result is one click away in the web client.

Solution you have in mind (optional)

Add --output <path> (with --format raw|json) to the CLI's tool-call/method commands, and a w keybinding on the TUI result view that prompts for (or defaults to) a filename and writes the current result there.

Alternatives or workarounds you have tried

No response

Already built it locally?

No response

Before you submit

  • I searched existing issues and this is not a duplicate.
  • This is a request for the Inspector itself, not for the MCP specification or an SDK.

Source: modelcontextprotocol/inspector