Official Schema: See the JSON Schema definition for parameter specifications.
Quick Reference
All parameter types and their constraints:
Common parameter properties:
String Parameters
String parameters accept text values with optional length, pattern, and enum constraints.Basic String
Use case: Simple text input without validationString with Length Constraints
Use case: Enforce minimum/maximum length (e.g., IBM i object names)- ✅
"CUSTFILE"- Valid (8 characters) - ❌
""- Error: Too short (0 < 1) - ❌
"VERYLONGOBJECTNAME"- Error: Too long (18 > 10)
String with Pattern (Regex)
Use case: Enforce specific format (e.g., IBM i naming conventions)- ✅
"MYLIB"- Valid - ✅
"APP_LIB"- Valid - ❌
"mylib"- Error: Doesn’t match pattern (lowercase) - ❌
"123LIB"- Error: Doesn’t match pattern (starts with number)
String with Enum
Use case: Restrict to specific allowed values- ✅
"*FILE"- Valid - ✅
"*PGM"- Valid - ❌
"*TABLE"- Error: Not in enum list
Optional String
Use case: Allow filtering that can be skippedInteger Parameters
Integer parameters accept whole numbers with optional min/max constraints.Basic Integer
Use case: Row limits, counts, IDs- ✅
10- Valid - ✅
100- Valid (at maximum) - ❌
0- Error: Below minimum - ❌
150- Error: Above maximum - ❌
"10"- Error: Must be integer, not string
Pagination Parameters
Use case: Page number and size for result paginationInteger with Enum
Use case: Specific numeric choicesFloat Parameters
Float parameters accept decimal numbers for percentages, thresholds, and measurements.Basic Float
Use case: Percentage multiplier, threshold value- ✅
0.1- Valid - ✅
0.25- Valid - ❌
0.5- Error: Exceeds maximum (0.5 > 0.3) - ❌
-0.1- Error: Below minimum
Threshold Example
Boolean Parameters
Boolean parameters accept true/false values for flags and options.Basic Boolean
Use case: Include/exclude certain dataBoolean to SQL: Booleans are passed as
1 (true) or 0 (false) in SQL. Use = 1 or = 0 in WHERE clauses.Boolean Flag Examples
Array Parameters
Array parameters accept lists of values, commonly used with SQL IN clauses.Basic Array
Use case: Filter by multiple values- ✅
["MA2100"]- Valid (1 item, within minLength) - ✅
["MA2100", "AD3100", "PL2100"]- Valid (3 items) - ❌
[]- Error: Below minLength (0 < 1) - ❌
["A", "B", ... "K"](11 items) - Error: Exceeds maxLength
Array with Different Item Types
Integer array:Validation and Error Handling
Validation Process
Parameters are validated in this order:- Type Check - Ensure value matches declared type
- Required Check - Ensure required parameters are provided
- Constraint Check - Validate min/max, length, pattern, enum
- SQL Binding - Safely bind validated parameters to SQL
Common Validation Errors
Type Mismatch
Type Mismatch
Error:
Expected integer, got string for parameter 'limit'Cause: Passing wrong typeMissing Required Parameter
Missing Required Parameter
Error:
Required parameter 'employee_id' is missingCause: Not providing a required parameterConstraint Violation
Constraint Violation
Error:
String length 18 exceeds maximum 10 for parameter 'library_name'Cause: Value violates constraintPattern Mismatch
Pattern Mismatch
Error:
Value does not match pattern '^[A-Z][A-Z0-9_]*$' for parameter 'library_name'Cause: Value doesn’t match regex patternEnum Violation
Enum Violation
Error:
Value must be one of: *FILE, *PGM, *SRVPGM for parameter 'object_type'Cause: Value not in enum listBest Practices
1. Write AI-Friendly Descriptions
Thedescription field is shown to AI agents. Make it helpful:
2. Use Appropriate Constraints
Match constraints to your data requirements:3. Provide Sensible Defaults
For optional parameters, include defaults:4. Use Enums for Fixed Choices
When values are limited, use enums:5. Handle Optional Parameters in SQL
Use NULL checks for optional parameters:Security: Parameter Binding
✅ Safe (parameter binding):- SQL statement is prepared with placeholders:
SELECT * FROM employees WHERE employee_id = ? - Parameters are validated against constraints
- Parameters are bound separately from the SQL structure
- Database executes the prepared statement with bound parameters
Complete Examples
Example 1: Employee Search Tool
Example 2: Project Team Finder
Example 3: System Monitoring Tool
Next Steps
Tools Reference
Complete tool configuration reference
Building SQL Tools
Step-by-step guide to creating tools
Sources Reference
Database connection configuration
Toolsets Reference
Organizing tools into groups
Parameter Design Philosophy: Good parameters make tools flexible without sacrificing safety. Use constraints to enforce data quality, provide defaults for convenience, and write clear descriptions to guide AI agents in using your tools correctly.