You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aa18be7
Browse filesBrowse the repository at this point in the historyBrowse files
feat(mcp): add --json mode that unwraps tool response envelope (#15)
Adds a --json flag to pipeboard mcp that emits a clean structured envelope
on stdout and suppresses status messages. The MCP content[].text wrapper
is auto-unwrapped and parsed as JSON when possible, so callers no longer
need to hunt for the start of the JSON in the output or double-parse
content[0].text themselves.
Success: {"ok": true, "data": <parsed>}
Tool-level error (isError=true): {"ok": false, "error": "...", "data": "..."} + exit 1
Transport/auth error: {"ok": false, "error": "..."} + exit 1
mcpCmd.PersistentFlags().StringVar(&mcpServer, "server", "", "MCP server path, e.g. meta-ads-mcp (required)")
46
47
mcpCmd.MarkPersistentFlagRequired("server")
48
+
mcpCmd.PersistentFlags().BoolVar(&mcpJSON, "json", false, "Emit a structured JSON envelope on stdout and suppress status messages on stderr. Unwraps the MCP content wrapper and parses text payloads as JSON when possible.")
47
49
48
50
mcpToolsCallCmd.Flags().StringVar(&mcpToolName, "tool", "", "Tool name to call (required)")
49
51
mcpToolsCallCmd.Flags().StringVar(&mcpToolArgs, "args", "{}", "JSON object of tool arguments")
0 commit comments