Skip to content

feat: Add source code management tools for IBM i development#148

Open
aleckvijay wants to merge 1 commit into
IBM:mainfrom
aleckvijay:feat/source-code-management-tools
Open

feat: Add source code management tools for IBM i development#148
aleckvijay wants to merge 1 commit into
IBM:mainfrom
aleckvijay:feat/source-code-management-tools

Conversation

@aleckvijay

Copy link
Copy Markdown

Feature: Source Code Management Tools for IBM i

Summary

This PR adds a comprehensive suite of source code management tools that enable AI agents to read, write, compile, and manage IBM i source code through the MCP protocol.

What's New

Six new tools in packages/server/src/ibmi-mcp-server/tools/source-code/:

  1. read_source_member - Read RPGLE/CL/COBOL source from source physical files
  2. write_source_member - Create or update source members
  3. compile_source - Compile RPGLE, SQLRPGLE, CL, CLLE, COBOL programs
  4. compile_with_setup - Compile with library list setup program
  5. get_compile_errors - Retrieve compilation errors from job log for AI analysis
  6. read_spool_file - Read compiler output and listings

Use Cases

  • AI-powered code generation for IBM i
  • Automated compilation workflows
  • Error diagnosis and debugging assistance
  • Source code management via MCP protocol
  • Integration with AI agents (Claude, GPT, etc.)

Real-World Validation

These tools have been tested in production on IBM i 7.5 systems and successfully used for:

  • Generating and compiling RPGLE programs
  • Debugging compilation errors with AI assistance
  • Managing source code across multiple libraries
  • Automating development workflows

Testing

All tools include:

  • ✅ Input validation with Zod schemas
  • ✅ Comprehensive error handling
  • ✅ Production-tested on IBM i 7.5
  • ✅ Integration with Mapepire connection pooling

Author

Vijay Kumar Verma - IBM i Developer

GitHub: @aleckvijay


This contribution aims to enable the IBM i community to leverage AI-powered development tools through the MCP protocol.

Add comprehensive source code management toolset enabling AI agents to:
- Read source code from source physical files (RPGLE, CL, COBOL)
- Write and update source members
- Compile programs with various options
- Retrieve compilation errors from job logs
- Read spool file output

Tools included:
- read_source_member: Read source from QRPGLESRC, QCLSRC, QCBLLESRC
- write_source_member: Create/update source members
- compile_source: Compile RPGLE, SQLRPGLE, CL, CLLE, COBOL programs
- compile_with_setup: Compile with library list setup program
- get_compile_errors: Extract compilation errors for AI analysis
- read_spool_file: Read compiler listings and output

Real-world tested in production on IBM i 7.5 systems.

Signed-off-by: Vijay Verma <aleckvijay@users.noreply.github.com>
@ajshedivy ajshedivy self-requested a review July 8, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant