sources:
ibmi-system:
host: ${DB2i_HOST}
user: ${DB2i_USER}
password: ${DB2i_PASS}
port: 8076
ignore-unauthorized: true
tools:
describe_object:
source: ibmi-system
description: Describe an SQL object by generating DDL definition
statement: |-
CALL QSYS2.GENERATE_SQL(
DATABASE_OBJECT_NAME => :name,
DATABASE_OBJECT_LIBRARY_NAME => :library,
DATABASE_OBJECT_TYPE => :type,
CREATE_OR_REPLACE_OPTION => '1',
PRIVILEGES_OPTION => '0',
STATEMENT_FORMATTING_OPTION => '0',
SOURCE_STREAM_FILE_END_OF_LINE => 'LF',
SOURCE_STREAM_FILE_CCSID => 1208
)
parameters:
- name: name
type: string
description: The name of the object
required: true
- name: library
type: string
description: The name of the library where the object is defined
required: true
default: QSYS2
- name: type
type: string
default: TABLE
description: |-
A character or graphic string expression that identifies the type of the database object or object attribute for which DDL is generated.
You can use these special values for the object type:
ALIAS
The object is an SQL alias.
CONSTRAINT
The object attribute is a constraint.
FUNCTION
The object is an SQL function.
INDEX
The object is an SQL index.
MASK
The object is an SQL column mask.
PERMISSION
The object is an SQL row permission.
PROCEDURE
The object is an SQL procedure.
SCHEMA
The object is an SQL schema.
SEQUENCE
The object is an SQL sequence.
TABLE
The object is an SQL table or physical file.
TRIGGER
The object attribute is a trigger.
TYPE
The object is an SQL type.
VARIABLE
The object is an SQL global variable.
VIEW
The object is an SQL view or logical file.
XSR
The object is an XML schema repository object.
domain: sysadmin
list_service_categories:
source: ibmi-system
description: List all service categories with counts of services in each.
statement: |-
SELECT service_category,
COUNT(*) AS service_count
FROM qsys2.services_info
GROUP BY service_category
ORDER BY service_count DESC, service_category
domain: sysadmin
category: discovery
metadata:
title: Service categories and counts
list_services_by_category:
source: ibmi-system
description: Browse services for a specific category with key details.
statement: |-
SELECT service_schema_name,
service_name,
sql_object_type,
object_type,
system_object_name,
earliest_possible_release,
latest_db2_group_level,
initial_db2_group_level
FROM qsys2.services_info
WHERE service_category = :category
ORDER BY service_schema_name, service_name
parameters:
- name: category
type: string
description: Exact value of SERVICE_CATEGORY to filter by.
required: true
domain: sysadmin
category: browse
metadata:
title: Services by category
search_services_by_name:
source: ibmi-system
description: Case-insensitive search of services by name (contains match).
statement: |-
SELECT service_category,
service_schema_name,
service_name,
sql_object_type,
earliest_possible_release
FROM qsys2.services_info
WHERE UPPER(service_name) LIKE UPPER('%' CONCAT :name_contains CONCAT '%')
ORDER BY service_category, service_schema_name, service_name
parameters:
- name: name_contains
type: string
description: Substring to search for in SERVICE_NAME.
required: true
minLength: 2
domain: sysadmin
category: search
metadata:
title: Search services by name
list_services_by_schema:
source: ibmi-system
description: List services provided by a specific schema (e.g., QSYS2, SYSTOOLS).
statement: |-
SELECT service_category,
service_name,
sql_object_type,
earliest_possible_release
FROM qsys2.services_info
WHERE service_schema_name = UPPER(:schema_name)
ORDER BY service_category, service_name
parameters:
- name: schema_name
type: string
description: Schema name (library), e.g., QSYS2 or SYSTOOLS.
required: true
minLength: 1
domain: sysadmin
category: browse
metadata:
title: Services by schema
list_services_by_sql_object_type:
source: ibmi-system
description: List services by SQL object type (VIEW, PROCEDURE, SCALAR FUNCTION, etc.).
statement: |-
SELECT service_category,
service_schema_name,
service_name,
sql_object_type,
earliest_possible_release
FROM qsys2.services_info
WHERE sql_object_type = :sql_object_type
ORDER BY service_category, service_schema_name, service_name
parameters:
- name: sql_object_type
type: string
description: SQL object type to filter by.
required: true
enum: ["VIEW", "PROCEDURE", "SCALAR FUNCTION", "TABLE FUNCTION", "TABLE"]
domain: sysadmin
category: browse
metadata:
title: Services by SQL object type
get_service_example:
source: ibmi-system
description: Retrieve the example SQL/usage snippet for a specific service.
statement: |-
SELECT service_schema_name,
service_name,
example
FROM qsys2.services_info
WHERE service_schema_name = UPPER(:schema_name)
AND service_name = UPPER(:service_name)
parameters:
- name: schema_name
type: string
description: Schema name containing the service (e.g., QSYS2).
required: true
- name: service_name
type: string
description: Exact SERVICE_NAME (case-insensitive match used).
required: true
domain: sysadmin
category: reference
metadata:
title: Get service example
where_is_service:
source: ibmi-system
description: Locate a service by name and return its schema and object metadata.
statement: |-
SELECT service_category,
service_schema_name,
service_name,
sql_object_type,
object_type,
system_object_name,
earliest_possible_release
FROM qsys2.services_info
WHERE UPPER(service_name) = UPPER(:service_name)
ORDER BY service_schema_name
parameters:
- name: service_name
type: string
description: Exact SERVICE_NAME to locate.
required: true
domain: sysadmin
category: search
metadata:
title: Where is this service?
search_examples_for_keyword:
source: ibmi-system
description: Search the EXAMPLE text for a keyword or phrase (case-insensitive).
statement: |-
SELECT service_category,
service_schema_name,
service_name,
SUBSTR(example, 1, 300) AS example_snippet
FROM qsys2.services_info
WHERE example IS NOT NULL
AND UPPER(example) LIKE UPPER('%' CONCAT :keyword CONCAT '%')
ORDER BY service_category, service_schema_name, service_name
parameters:
- name: keyword
type: string
description: Keyword or phrase to search for within EXAMPLE text.
required: true
minLength: 2
domain: sysadmin
category: search
metadata:
title: Search examples for keyword
count_services_by_schema:
source: ibmi-system
description: Count services by providing schema.
statement: |-
SELECT service_schema_name,
COUNT(*) AS service_count
FROM qsys2.services_info
GROUP BY service_schema_name
ORDER BY service_count DESC, service_schema_name
domain: sysadmin
category: discovery
metadata:
title: Service counts by schema
count_services_by_sql_object_type:
source: ibmi-system
description: Summarize services by SQL object type.
statement: |-
SELECT sql_object_type,
COUNT(*) AS service_count
FROM qsys2.services_info
GROUP BY sql_object_type
ORDER BY service_count DESC, sql_object_type
domain: sysadmin
category: discovery
metadata:
title: Service counts by SQL object type
list_categories_for_schema:
source: ibmi-system
description: Show which categories exist within a given schema.
statement: |-
SELECT service_schema_name,
service_category,
COUNT(*) AS service_count
FROM qsys2.services_info
WHERE service_schema_name = UPPER(:schema_name)
GROUP BY service_schema_name, service_category
ORDER BY service_count DESC, service_category
parameters:
- name: schema_name
type: string
description: Schema name to summarize (e.g., QSYS2).
required: true
domain: sysadmin
category: discovery
metadata:
title: Categories within a schema
toolsets:
sysadmin_discovery:
title: Sys Admin Discovery
description: High-level summaries and counts for services.
tools:
- list_service_categories
- count_services_by_schema
- count_services_by_sql_object_type
- list_categories_for_schema
sysadmin_browse:
title: Sys Admin Browse
description: Explore services by category, schema, and SQL object type; validate metadata.
tools:
- list_services_by_category
- list_services_by_schema
- list_services_by_sql_object_type
sysadmin_search:
title: Sys Admin Search
description: Search capabilities for service names and example usage.
tools:
- search_services_by_name
- where_is_service
- search_examples_for_keyword
- get_service_example