::
FIG 2.1 // ENTRY
Back to Index

AI-Powered Tools for IBM i

Date:
AI-Powered Tools for IBM i Hero Image

NPM Package

Preface

This project started from a simple need: training new IBM i users. The platform is powerful but complex, and getting newcomers up to speed takes time. I wanted to build something that could act as an intelligent assistant—one that knows the system internals and can guide users through operations, diagnostics, and discovery.

That idea evolved into a full toolkit. We are currently testing it internally against live IBM i servers. It is still in beta, but the shape of it is solid enough to share.

What It Is

At the center is an MCP (Model Context Protocol) server published as @bdkinc/ibmi-mcp. It exposes deep system integration to any AI that speaks MCP. Because it is BYOK (Bring Your Own AI), you provide the model and the server provides the tools.

Surrounding the server are two interfaces:

  • A web application that connects directly to the MCP server.
  • A desktop application for users who prefer a native client.

Both are built to make IBM i feel less like a black box and more like a conversation.

Architecture

The server is built on Hono and talks to IBM i through knex-ibmi and nodejs-itoolkit. The web app itself is built on top of my tanstack-hono SSR monolith template.

Everything lives in a single monorepo with a shared design system, which keeps the desktop and web experiences consistent.

From 184 Tools to 31

An early version of the server exposed 184 individual tools. The sheer volume created two concrete problems.

First, VSCode (and several other MCP clients) enforces a hard limit of 128 tools. We were well beyond that.

Second, 184 options made LLM decision-making measurably harder. Too much surface area led to hesitation and incorrect selections.

I redesigned the tool surface down to 31 core facade tools that cascade into multiple selectors. Each facade tool accepts a view or operation parameter, so the LLM makes a coarse decision first, then drills down. This also lets a single MCP session connect to multiple IBM i servers without tool duplication. The result is a cleaner interface, faster model decisions, and a more intuitive path from intent to action. We aimed for a mix where the user and agent both have freedom to explore, while guided workflows keep actions predictable and safe.

The 31 Core Tools

The tools are grouped into Observe (read-only), Recommend & Act (mutating), and General & Context helpers.

Observe (Read-Only Facades)

ToolPurpose
inspect_systemHardware health, OS identity, PTF status, disk, memory pools, system values
inspect_storageStorage pools, consumption, temp usage by job, ASP configuration
inspect_jobsActive, scheduled, and queued jobs, job queues, performance pressure
inspect_subsystemsRunning subsystems and subsystem descriptions
inspect_spoolOutput queues, spooled files, printer writers, file contents
inspect_messagesHistory log, QSYSOPR, job logs, message queues
inspect_ifsIFS directories, file content, search, metadata
inspect_objectsLibrary objects, locks, save history, authority
inspect_networkTCP servers, listeners, connections, HTTP servers, NetServer, DRDA
inspect_usersUser profiles, authorities, stale accounts, password expiration
inspect_securityAudit config, certificate expiry, login activity, authorization lists
inspect_databaseDb2 schemas, tables, indexes, foreign keys, SQL services
inspect_powerhaHigh-availability clusters, CRGs, replication, HyperSwap
inspect_brmsBackup history, control groups, media, job activity
run_sql_recipeExecute audited, read-only IBM i diagnostic SQL recipes

Recommend & Act (Mutating Facades)

All state-changing tools use a two-phase preview → approve → execute lifecycle.

ToolPurpose
manage_jobEnd, hold, release, or change job properties
manage_job_queueHold or release job queues
manage_subsystemStart or end subsystem descriptions
manage_spool_fileDelete, hold, or move spooled files
manage_ifs_pathDelete, rename, move, create/remove directories, change IFS authority
manage_ifs_backupSave or restore IFS directories
manage_tcp_serverStart or stop TCP network daemons
manage_messagesReply, send, or clear messages
manage_user_profileCreate, disable, reset password, change, or delete user profiles
manage_object_securityGrant/revoke authority, change owner, restore libraries

General & Context

ToolPurpose
plan_run_ibmi_commandPreview any CL command and generate an approval context
run_ibmi_commandExecute an arbitrary CL command after approved planning
manage_sessionSet or retrieve session settings like library lists (*LIBL)

What You Can Do With It

For new users, the assistant is a tutor. It can walk you through navigating the IFS, checking active jobs, or understanding spool files.

For experienced operators, it is an accelerator. You can ask for quick storage analysis, filtered job logs, or targeted health checks. Instead of memorizing command syntax, you describe what you need and the server translates that into the right system calls.

The Apps in Action

Current Status

The project is in beta and is being validated internally on production IBM i environments. The goal is to harden the toolset, refine the selectors, and ensure the responses are reliable before a wider release.

If you work with IBM i and are curious about augmenting it with AI, this is the direction I am heading. More soon.