Commit eed2573
committed
fix(jira): expose customFields as an array to LLMs and reject empty text
Round 7 (Cursor):
- customFields tool param was type: 'json', which the schema builder exposes to
LLMs as a JSON Schema object while the contract requires an array — a model
emitting an object/map would 400. Switch to type: 'array' with an items schema
describing { fieldId, type, value }, matching the array params in jira/write.ts.
- text custom-field values must be non-empty (min 1), so '' is rejected at the
boundary instead of passing validation and being silently skipped — consistent
with select/userpicker/cascading. Adds a route test.1 parent 19cd38e commit eed2573
3 files changed
Lines changed: 25 additions & 2 deletions
File tree
- apps/sim
- app/api/tools/jira/update
- lib/api/contracts/selectors
- tools/jira
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
109 | 125 | | |
110 | 126 | | |
111 | 127 | | |
| |||
0 commit comments