Skip to content

fix: correct snapshot handler argument passing#5

Open
aazamil wants to merge 1 commit intotjnull:mainfrom
aazamil:fix/snapshot-argument-passing
Open

fix: correct snapshot handler argument passing#5
aazamil wants to merge 1 commit intotjnull:mainfrom
aazamil:fix/snapshot-argument-passing

Conversation

@aazamil
Copy link

@aazamil aazamil commented Feb 28, 2026

Problem

The snapshot tools (snapshot_host and batch_snapshot_hosts) fail when called through Claude Desktop with these errors:

  • SnapshotHandler.create_snapshot() got an unexpected keyword argument 'vm_name'
  • SnapshotHandler.create_snapshot() takes from 2 to 3 positional arguments but 5 were given

Root Cause

In core.py and batch.py, snapshot functions were passing vm_name, name, and description as separate arguments to the handler. But SnapshotHandler.create_snapshot() expects (snapshot_config: dict, user_id).

Fix

Wrapped the arguments into a snapshot_config dict:

  • snapshot_host in core.py
  • batch_snapshot_hosts, batch_rollback_snapshots, batch_remove_snapshots in batch.py

Testing

Verified fix working with Claude Desktop + Ludus lab

Closes #4

- snapshot_host and batch_snapshot_hosts were passing vm_name, name,
  description as separate args to SnapshotHandler.create_snapshot()
  which expects (snapshot_config: dict, user_id)
- Fixed by wrapping args into snapshot_config dict
- Same fix applied to rollback_snapshot and remove_snapshot in batch.py
- Verified fix working with Claude Desktop + Ludus lab
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.

Bug: snapshot tools fail with argument errors

1 participant