Skip to main content
The CLI can execute any YAML-defined SQL tool as a command. Tool parameters are automatically converted to CLI flags, giving you a type-safe command-line interface for every tool in your YAML files.

How It Works

When you run ibmi tool <name>, the CLI:
  1. Loads the YAML file(s) specified by --tools
  2. Finds the tool by name
  3. Converts its parameters to Commander.js options (snake_case becomes --kebab-case)
  4. Validates required parameters and type constraints
  5. Executes the SQL with bind parameters
  6. Renders the result in the selected output format

Running a Tool

Pass parameters as flags:

Dry Run

Preview the resolved SQL and parameters without executing:

Discovering Tools

List All Tools

Filter by Toolset

Show Tool Details

View a tool’s description, parameters, and SQL statement:

List Toolsets


Parameter Mapping

YAML parameter definitions map directly to CLI flags:

Example

Given this YAML tool definition:
The CLI command would be:

Multiple YAML Files

Load tools from multiple files or directories:
When loading a directory, all .yaml and .yml files are loaded and merged. Tool names must be unique across all loaded files.
The --tools flag uses the same YAML format as the MCP server’s --tools option. You can use the same tool files for both the CLI and the server.