p202 mcp call

Run one MCP tool with JSON arguments, as an AI app's call would

New in 1.9.78
All commands

01Run it

Straight from the command's own help.

p202 mcp call campaign_list --input '{"limit": "5"}'

02What you get

Pick the shape you need. People get a table. Add --json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 mcp call

Set flags below; the command updates as you type.

04Flags

2 flags, plus the global flags every command takes.

FlagWhat it does
--inputstring ยท default {}The tool's arguments as a JSON object, or - to read them from stdin
--read-onlyboolRefuse a tool that changes data

05For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands mcp call --json.
  • With AI_AGENT, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure, 6 no Pro licence on the install.
p202 commands mcp call --json
{
  "path": "p202 mcp call",
  "use": "call <tool>",
  "short": "Run one MCP tool with JSON arguments, as an AI app's call would",
  "runnable": true,
  "example": "p202 mcp call campaign_list --input '{\"limit\": \"5\"}'\n  echo '{\"period\": \"last7\"}' | p202 mcp call report_summary --input -",
  "flags": [
    {
      "name": "input",
      "type": "string",
      "default": "{}",
      "usage": "The tool's arguments as a JSON object, or - to read them from stdin",
      "required": false
    },
    {
      "name": "read-only",
      "type": "bool",
      "default": "false",
      "usage": "Refuse a tool that changes data",
      "required": false
    }
  ]
}