p202 mcp call

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

All commands

01Run the command

Examples from the command's help text.

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

02Output formats

Choose an output format. The default is a table. Add --json, --csv or --ndjson for scripts, or -q for ids only. Agent environments use compact JSON by default. All output formats

03Build your command

Enter values to generate a quoted command you can copy and run.

p202 mcp call

Set flags below; the command updates as you type.

04Flags

2 flags, plus the global flags available on every command.

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

  • Get the command specification as JSON: p202 commands mcp call --json.
  • With AI_AGENT, CLAUDECODE or another agent variable set, output is compact JSON and errors are written to stderr as JSON with a hint for the next step.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure, 6 no active ClickServer 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
    }
  ]
}