iagctl mcp tool call

Gateway 5.5+

Call a tool on an MCP server.

The iagctl mcp tool call command executes a specific tool exposed by a registered MCP server and returns the result. Use iagctl mcp tool list to see the tools available on a server and their expected input parameters.

For more information, see Register and manage MCP servers.

Syntax

$iagctl mcp tool call <tool_name> <mcp_server> [flags]

Examples

Call a tool without parameters

$iagctl mcp tool call list_directory my-server

Call a tool with parameters

Parameters are provided as a JSON string using the --params flag. The expected structure depends on the tool — use iagctl mcp tool list --raw to view each tool’s input schema.

$iagctl mcp tool call read_file my-server \
> --params '{"path": "/private/tmp/example.txt"}'

Call a tool and return raw JSON output

$iagctl mcp tool call read_file my-server \
> --params '{"path": "/private/tmp/example.txt"}' \
> --raw

Options

$ -h, --help Help for call
$ --params string Parameters to pass to the tool, as a JSON string

Options inherited from parent commands

$ --config string Path to the configuration file
$ --profile string Specify the client profile to use (case-insensitive, defaults to [client] section)
$ --raw Display the result of the command in raw format
$ --verbose Enable verbose output