How It Works
When you runibmi tool <name>, the CLI:
- Loads the YAML file(s) specified by
--tools - Finds the tool by name
- Converts its parameters to Commander.js options (
snake_casebecomes--kebab-case) - Validates required parameters and type constraints
- Executes the SQL with bind parameters
- Renders the result in the selected output format
Running a Tool
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:| YAML Parameter | CLI Flag | Type Handling |
|---|---|---|
name: schema_name | --schema-name | Underscore to kebab-case |
type: string | String value | Passed as-is |
type: integer | Number value | Parsed and validated |
type: boolean | Boolean flag | --flag or --no-flag |
required: true | Required option | Error if missing |
default: 50 | Optional with default | Used when not specified |
Example
Given this YAML tool definition:Multiple YAML Files
Load tools from multiple files or directories:.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.