feat(opencode): add ibmi column-info tool and harden permissions

- add the get_column_info custom tool for the ibmi-mcp-server and
  relocate its --tools path from a hardcoded absolute path into the
  version-controlled tree via {env:HOME} interpolation
- reorder permission rules so "rm -rf *" (deny) is no longer shadowed
  by "rm *" (ask); last-match-wins now resolves rm -rf to deny
- add allow rules for the Python toolchain (unittest, py_compile,
  venv activation, ruff check/format)
- rename plugin/ to plugins/ to match the documented plural convention
- commit package.json and package-lock.json so the ibmi-gate plugin
  resolves @opencode-ai/plugin on a fresh stow
- correct the README opencode directory description
This commit is contained in:
2026-07-31 09:14:29 -05:00
parent 4038a5ccbe
commit e94d6b3c14
6 changed files with 465 additions and 4 deletions
@@ -0,0 +1,43 @@
sources:
ibmi-system:
host: ${DB2i_HOST}
user: ${DB2i_USER}
password: ${DB2i_PASS}
tools:
get_column_info:
source: ibmi-system
description: >-
Retrieve a table's column details like TABLE_NAME, SYSTEM_TABLE_NAME,
COLUMN_NAME, SYSTEM_COLUMN_NAME, DATA_TYPE, LENGTH, NUMERIC_SCALE,
IS_NULLABLE, COLUMN_HEADING, COLUMN_TEXT from the system catalog for the
specified table.
parameters:
- name: table_name
type: string
description: "The name of the table to retrieve columns for."
required: true
statement: |
SELECT
TABLE_NAME,
SYSTEM_TABLE_NAME,
COLUMN_NAME,
SYSTEM_COLUMN_NAME,
DATA_TYPE,
LENGTH,
NUMERIC_SCALE,
IS_NULLABLE,
COLUMN_HEADING,
COLUMN_TEXT
FROM
QSYS2.SYSCOLUMNS
WHERE
TABLE_NAME = UPPER(:table_name)
ORDER BY
TABLE_NAME,
ORDINAL_POSITION
toolsets:
custom_tools:
tools:
- get_column_info