Commit 5cdb0c5
Improve pipeline tools: wait for completion, concise errors, better defaults (#366)
* Add early validation for catalog/schema/volume existence
- Add _validate_volume_path() to check schema and volume exist before LLM work
- Fail fast with clear ValueError instead of stalling on upload failures
- Add timing logs for LLM calls to help debug performance
- Reduces wasted time/cost when destination doesn't exist
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Make upload_folder follow cp -r semantics for folder name handling
- Without trailing slash: preserves source folder name (pipeline → dest/pipeline/)
- With trailing slash or /*: copies contents only (pipeline/ → dest/)
- Supports both Unix (/) and Windows (\) path separators
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Reduce get_pipeline_events default from 100 to 5
Events contain verbose stack traces that can overflow output buffers.
Default of 5 captures recent update lifecycle (INITIALIZING → FAILED)
with error details without overwhelming the response.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Improve get_pipeline_events defaults and add filtering options
- Reduce default max_results from 100 to 5 (events contain verbose stack traces)
- Add filter parameter with default "level='ERROR'" to focus on errors
- Add update_id parameter to filter events by specific pipeline update
- Update docstrings with filter examples and usage guidance
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add wait option to start_update with default=True
- start_update now waits for pipeline completion by default (wait=True)
- Returns state, success, duration_seconds, and errors on completion
- On failure, automatically fetches ERROR/WARN events for that update_id
- Default timeout is 5 minutes (configurable)
- Change get_pipeline_events default filter to include WARN level
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Improve get_update to auto-fetch errors and hide verbose config
- get_update now returns a simplified dict with state, success, cause, errors
- Auto-fetches ERROR/WARN events when update fails (like start_update)
- Add include_config=False (default) to hide verbose pipeline configuration
- Fix get_pipeline_events update_id filter to use client-side filtering
(API doesn't support origin.update_id in filter expressions)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add error_summary for concise error messages in pipeline tools
- Add _extract_error_summary() to get clean error messages without stack traces
- start_update and get_update now return error_summary by default
- Add full_error_details=False parameter to get full stack traces if needed
- Falls back to event.message if no exception message found
Example output:
{
"state": "FAILED",
"error_summary": ["SparkException: File '...' was not found..."]
}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Shorten MCP tool docstrings for pipelines
Reduce verbosity in tool descriptions - the LLM will read the return
values anyway, so detailed return schemas aren't needed in docstrings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Simplify pipeline MCP tool docs and use event_log_level
- Remove verbose SDK option lists from extra_settings docs
- Replace filter param with event_log_level (ERROR, WARN, INFO)
- WARN includes ERROR, INFO includes all events
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add SDP acronym to create_pipeline docstring
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Remove unused imports
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Line too long lint errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Quentin Ambard <quentin.ambard@databricks.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 357d85f commit 5cdb0c5
File tree
8 files changed
+376
-115
lines changed- databricks-mcp-server/databricks_mcp_server/tools
- databricks-tools-core
- databricks_tools_core
- file
- pdf
- spark_declarative_pipelines
- tests/unit
8 files changed
+376
-115
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | | - | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
Lines changed: 71 additions & 89 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 47 | + | |
| 48 | + | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
| 51 | + | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
| |||
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 117 | + | |
| 118 | + | |
123 | 119 | | |
124 | 120 | | |
125 | | - | |
| 121 | + | |
126 | 122 | | |
127 | 123 | | |
128 | 124 | | |
| |||
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
160 | | - | |
| 156 | + | |
161 | 157 | | |
162 | 158 | | |
163 | 159 | | |
164 | 160 | | |
165 | 161 | | |
166 | 162 | | |
167 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
168 | 167 | | |
169 | | - | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | | - | |
| 181 | + | |
180 | 182 | | |
181 | | - | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
187 | 192 | | |
188 | | - | |
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
192 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
193 | 202 | | |
194 | | - | |
| 203 | + | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
| 208 | + | |
| 209 | + | |
199 | 210 | | |
200 | 211 | | |
201 | | - | |
| 212 | + | |
202 | 213 | | |
203 | | - | |
204 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
205 | 220 | | |
206 | 221 | | |
207 | 222 | | |
| |||
222 | 237 | | |
223 | 238 | | |
224 | 239 | | |
225 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
226 | 243 | | |
227 | 244 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 245 | + | |
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
234 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
235 | 252 | | |
236 | 253 | | |
237 | | - | |
| 254 | + | |
238 | 255 | | |
239 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
240 | 267 | | |
241 | 268 | | |
242 | 269 | | |
| |||
254 | 281 | | |
255 | 282 | | |
256 | 283 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 284 | + | |
266 | 285 | | |
267 | 286 | | |
268 | 287 | | |
269 | | - | |
270 | | - | |
| 288 | + | |
| 289 | + | |
271 | 290 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
282 | 297 | | |
283 | 298 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 299 | + | |
318 | 300 | | |
319 | 301 | | |
320 | 302 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
Lines changed: 35 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | | - | |
| 154 | + | |
| 155 | + | |
151 | 156 | | |
152 | | - | |
| 157 | + | |
153 | 158 | | |
154 | 159 | | |
155 | 160 | | |
| |||
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
166 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
167 | 178 | | |
168 | 179 | | |
169 | 180 | | |
170 | 181 | | |
171 | 182 | | |
172 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
173 | 192 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
179 | 198 | | |
180 | 199 | | |
181 | 200 | | |
182 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
183 | 210 | | |
184 | 211 | | |
185 | 212 | | |
| |||
0 commit comments