Skip to content

Conversation

@ajshedivy
Copy link
Member

improve markdown formatter.

Table Format Styles

Turn on optional markown formatting:

responseFormat: markdown

The tableFormat field controls the visual style of result tables. Four styles are available:

  • markdown (default)
  • ascii
  • grid
  • compact
tools:
  get_employee_details:
    source: ibmi-sample
    description: Retrieve detailed information about an employee including department and manager
    statement: |
      SELECT 
        E.EMPNO, 
        E.FIRSTNME, 
        E.MIDINIT, 
        E.LASTNAME, 
        E.JOB, 
        E.HIREDATE, 
        E.SALARY, 
        E.BONUS, 
        E.WORKDEPT,
        D.DEPTNAME,
        D.LOCATION,
        M.FIRSTNME AS MGR_FIRSTNME,
        M.LASTNAME AS MGR_LASTNAME
      FROM SAMPLE.EMPLOYEE E
      LEFT JOIN SAMPLE.DEPARTMENT D ON E.WORKDEPT = D.DEPTNO
      LEFT JOIN SAMPLE.EMPLOYEE M ON D.MGRNO = M.EMPNO
      WHERE E.EMPNO = :employee_id
    parameters:
      - name: employee_id
        type: string
        description: "Employee ID (e.g., '000010') - Must be 6 digits"
        required: true
        pattern: "^[0-9]{6}$"
    responseFormat: markdown
    tableFormat: grid

… table formatter with NULL handling

- Implemented tests for SQL formatting utilities including column alignment and header formatting.
- Added integration tests for TableFormatter to handle NULL values and various formatting styles.
- Enhanced test coverage for handling edge cases, including empty arrays and mixed data types.
- Updated sample YAML configuration to specify response format as markdown.
- Mocked logger in test setup to suppress logging during test execution.
@ajshedivy ajshedivy merged commit 5d2819a into main Nov 13, 2025
1 check passed
@ajshedivy ajshedivy deleted the feat/markdown-formatter branch November 13, 2025 16:57
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.

2 participants