CLI command

probierz mcp-call call

Call one tool of a product's MCP server and answer what it returned.

Invocation#

Shell
probierz mcp-call call <TOOL> [--arguments <JSON>] --seconds <N> (--url <ENDPOINT> | -- <PROGRAM> [ARGS...])

Required inputs and options#

  • <TOOL> as mcp-call list names it; --arguments the tool's arguments, a JSON object ({} when omitted); --seconds, --url and the program after -- as for list.

Output and state effects#

Initializes the server as list does, asks tools/call and prints {program, url, tool, isError, text, content, structuredContent}: text every text part joined by line feeds, content and structuredContent as the tool returned them. A journey (a tui program, or any) runs it and asserts the answer.

Exact refusals#

  • arguments-invalid (exit 2): --arguments that is not JSON, or JSON that is no object; no server is started.
  • tool-failed (exit 1): the tool answered isError: true; its answer is printed whole first, so a journey expecting the refusal can hold it.
  • server-error (exit 1): an unknown tool, or arguments the server refuses, as its error object says; and every refusal of list. Real test: tests/mcpcall/calls.rs.

Declared refusals#

What probierz refusals list declares for this command at revision d2cd6156e8b8dc6204dab7b46ec0b34b2bb03cea (probierz 0.1.7 (revision unknown, not built from a git checkout)): each cause's id, the operation declaring it, its exit status and code, and its remedy.

  • program-unstartable (probierz.mcp-call, exit 1, config): starting the MCP server {program}: {error}. name after -- the program that serves the product's MCP on stdio and its arguments, as its documentation gives them.
  • server-silent (probierz.mcp-call, exit 1, refused): waiting for {program} to answer {method}: it answered nothing in {seconds} s. give it the time it takes with --seconds, or find in its standard error, shown above, why it does not answer.
  • server-closed (probierz.mcp-call, exit 1, refused): asking {program} {method}: {observed}. start the server by hand with the same command to see why it ends.
  • answer-malformed (probierz.mcp-call, exit 1, refused): reading what {program} answered {method}: it wrote a line that is no JSON-RPC message, which the MCP stdio transport does not allow: {line}. the server writes its logs to standard error, never to standard output.
  • server-error (probierz.mcp-call, exit 1, refused): asking {program} {method}: it answered the error {error}. read the error: an unknown tool is named by probierz mcp-call list; arguments are held to the tool's input schema.
  • http-refused (probierz.mcp-call, exit 1, refused): asking the MCP endpoint {url} {method}: {observed}. give --url the endpoint the product's documentation names for its MCP over Streamable HTTP, and check that this machine reaches it and that it answers each POSTed message with JSON or an event stream holding the response.
  • tool-failed (probierz.mcp-call, exit 1, refused): calling the tool {tool} of {program}: the tool answered isError: {text}. a journey that expects this refusal holds the answer printed; otherwise fix what the tool says.
  • arguments-invalid (probierz.mcp-call, exit 2, refused): reading the arguments of the tool {tool}: --arguments is {problem}. give --arguments a JSON object, like '{"title": "Third item"}'.

Source snapshot#

Generated from the Rust binaries at revision 99a74945a3598a8d73b6c6cbe5aae4f283becea3 of Probierz's private source repository.

Combined help SHA-256: 77529678a61237f774b59e76df0d1907cb749ef5da56d2ed913b040793b7d30b; binary SHA-256: be9e0eaff0e6ea50403a0c6f6d467697a4eac676f9523b8dc13a596d2b5526c5.