AI-1166: add delete_config tool (split from #498) - #561
Draft
Matovidlo wants to merge 1 commit into
Draft
Conversation
Split out of PR #498 per review feedback. Dedicated tool instead of a delete=True flag on update tools, so the destructive annotation is unambiguous. Configurations are moved to the trash (recoverable from the Keboola UI) — skip_trash is not used. SQL transformations are deletable; flows and data apps are rejected via check_deletable(). Linked configurations (e.g. keboola.variables) are NOT cascade-deleted and are left orphaned for now. Includes RFC (feature_spec/delete-config/RFC.md), unit tests, TOOLS.md regeneration and version bump 1.65.0 -> 1.66.0 (minor, new tool). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@claude review |
13 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated delete_config MCP tool to delete (trash) component configurations, split out for clearer destructive semantics and client-side gating.
Changes:
- Introduces
delete_configtool that moves configurations to the project trash (recoverable) and returns pre-deletion metadata. - Adds
check_deletable()guard to reject flows and data apps, while allowing SQL transformations to be deleted via the same tool. - Updates tool registry/docs/tests and bumps project version to
1.66.0.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/keboola_mcp_server/tools/components/tools.py |
Registers and implements the new delete_config tool. |
src/keboola_mcp_server/tools/components/utils.py |
Adds check_deletable() and undeletable-component message map. |
tests/tools/components/test_tools.py |
Adds unit tests for delete_config and rejection cases. |
tests/test_server.py |
Ensures the tool is listed and annotated/tagged correctly. |
TOOLS.md |
Regenerates tools documentation to include delete_config. |
feature_spec/delete-config/RFC.md |
Adds RFC documenting intended behavior/constraints. |
pyproject.toml |
Version bump to 1.66.0. |
uv.lock |
Lockfile version bump to 1.66.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1580
to
+1584
| detail = await client.storage_client.configuration_detail( | ||
| component_id=component_id, configuration_id=configuration_id | ||
| ) | ||
| await client.storage_client.configuration_delete(component_id=component_id, configuration_id=configuration_id) | ||
| LOG.info(f'Deleted configuration "{configuration_id}" of component "{component_id}" (moved to trash).') |
Comment on lines
+2210
to
+2213
| # The configuration must go to the trash (recoverable) — skip_trash must not be enabled. | ||
| keboola_client.storage_client.configuration_delete.assert_called_once_with( | ||
| component_id=component_id, configuration_id=configuration_id | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Linear: AI-1166
Change Type
Summary
Split out of #498 per @cjayyy's review — delete is orthogonal to variables and deserves its own review and changelog visibility.
Adds a dedicated
delete_configtool for deleting component configurations, addressing all three review concerns:delete=Trueflag onupdate_config/update_sql_transformation— thedestructiveHint=True, idempotentHint=Falseannotation now unambiguously means "deletes", and clients can gate this one tool.skip_trash=True— deletes are recoverable from the Keboola UI (Settings → Trash). No permanent-delete path is exposed.keboola.variablesconfig) are left in place (orphaned) for now; cascade clean-up is deferred until AI-1166: add variables parameter to create/update SQL transformation and config tools #498 lands.Behavior:
keboola.orchestrator,keboola.flow) and data apps are rejected via a newcheck_deletable()guard with a pointer to their dedicated toolsConfigToolOutputcarrying the pre-deletion description/version plus a change summary noting the config can be restoredRFC:
feature_spec/delete-config/RFC.mdNote: whether the assistant should be allowed to delete configurations at all (HITL/approval gating) remains an open product decision — this PR keeps the operation recoverable and clearly annotated so that discussion can happen on its own terms.
Testing
Streamable-HTTPtransports)Optional testing
canary-orionMCP (Streamable-HTTP)canary-orioncanary-orionChecklist
🤖 Generated with Claude Code