Tool Reference

May 29, 2026 ยท View on GitHub

All tools use the @tool decorator and are auto-registered on import. Source: gently/agent/tools/ (run mode) and gently/agent/plan_mode/tools/ (plan mode).


Run Mode Tools

Acquisition (acquisition_tools.py)

ToolDescription
acquire_volumeAcquire a single 3D lightsheet volume for a specific embryo with calibration data
capture_lightsheetCapture a single 2D lightsheet fluorescence image at specified piezo/galvo position
batch_lightsheetCapture lightsheet images from ALL embryos and show them in the web UI viewer

Analysis (analysis_tools.py)

ToolDescription
analyze_volumeAnalyze embryo volume using Claude Vision API
get_detection_summaryGet summary of all detections across all embryos

Calibration (calibration_tools.py)

ToolDescription
calibrate_embryoRun full piezo-galvo calibration for a specific embryo using Claude vision
calibrate_all_embryosRun piezo-galvo calibration for all detected embryos sequentially

Detection (detection_tools.py)

ToolDescription
detect_embryosAutomatically detect embryos using brightness detection and SAM segmentation
manual_mark_embryosOpen interactive window to manually mark embryos by clicking
edit_embryosAdd/remove/move embryo positions in the web map view
show_detected_embryosCapture fresh image and display all tracked embryos with labeled bounding boxes

Detectors (detector_tools.py)

ToolDescription
list_detectorsList all registered detectors and their status
enable_disable_detectorEnable or disable a specific detector
remove_detectorRemove a detector from the registry
add_detectorAdd a new detector with custom detection prompt
enable_preset_detectorEnable a preset detector (hatching, comma, pretzel, gastrulation, first_division)
generate_detector_promptGenerate optimal detection prompt from a description
test_detectorTest a detector on a specific embryo's latest image
query_timeline_eventsQuery timeline for detection and timelapse events

Experiment (experiment_tools.py)

ToolDescription
get_experiment_summaryGet comprehensive summary of current experiment
query_embryo_statusQuery detailed status of a specific embryo
skip_embryoMark embryo to skip in future acquisitions
remove_embryoPermanently remove embryo from experiment
resume_embryoResume imaging a previously skipped embryo
assign_nicknameAssign memorable nickname to an embryo
modify_parametersModify acquisition parameters for an embryo

Focus (focus_tools.py)

ToolDescription
fine_focusPerform fine focus adjustment by scanning piezo positions and finding optimal focus
get_focus_scoreCalculate focus score for the current lightsheet image without moving the piezo
get_focus_historyGet focus history for an embryo showing all piezo-galvo measurements over time

Interaction (interaction_tools.py)

ToolDescription
ask_user_choicePresent user with selectable options for discrete choices

LED (led_tools.py)

ToolDescription
set_ledSet the LED illumination state
get_led_statusGet current LED illumination status

Plan Execution (plan_execution_tools.py)

ToolDescription
execute_plan_itemExecute a planned imaging item โ€” resolve spec, configure parameters, start timelapse
complete_current_plan_itemMark the currently executing plan item as complete

Session (session_tools.py)

ToolDescription
assess_image_qualityAssess image quality metrics (focus, brightness, noise) and suggest adjustments
get_session_statsGet statistics for the current session (interactions, corrections, tool usage)
compare_embryo_developmentCompare developmental progress across multiple embryos
analyze_correctionsAnalyze user corrections from interaction logs to identify patterns
export_interaction_logExport interaction logs for external analysis
import_embryos_from_sessionImport embryos (positions, calibration, settings) from another session
list_sessionsList available sessions with IDs, embryo counts, and last active times

Stage (stage_tools.py)

ToolDescription
move_to_embryoMove XY stage to a specific embryo's stored position
get_stage_positionGet current XY stage position in micrometers
move_stageMove XY stage to specific coordinates in micrometers

Timelapse (timelapse_tools.py)

ToolDescription
generate_bluesky_planGenerate a Bluesky acquisition plan from a scientific goal
start_adaptive_timelapseStart an adaptive timelapse that runs in the background
get_timelapse_statusGet current status of the running timelapse including per-embryo progress
modify_timelapse_embryoModify parameters for a specific embryo during a running timelapse
add_embryo_to_timelapseAdd an embryo to an already running timelapse
stop_timelapse_embryoStop imaging a specific embryo (others continue)
stop_timelapseStop the entire timelapse acquisition
pause_timelapsePause the timelapse (can be resumed)
resume_timelapseResume a paused timelapse
add_stop_conditionAdd an additional stop condition to a running timelapse (OR logic)
add_interval_speedup_ruleAdd rule to speed up imaging when a developmental stage is reached
enable_pre_hatching_speedupEnable automatic speedup when embryos approach hatching
classify_embryo_stageUse Claude Vision to classify the current developmental stage
get_stage_historyGet the developmental stage progression history for an embryo
predict_hatchingPredict time-to-hatching with confidence intervals based on stage

Volume (volume_tools.py)

ToolDescription
view_imageCapture and display current bottom camera widefield image
view_volumeOpen a volume in the in-browser 3D viewer
list_volumesList available volumes for an embryo or all embryos

Plan Mode Tools

Planning (planning.py)

ToolDescription
create_campaignCreate a research campaign or phase (top-level research goal)
create_plan_itemCreate a plan item (imaging, bench, genetics, analysis, or decision_point)
update_plan_itemUpdate fields on an existing plan item
link_plan_itemsAdd a dependency between two plan items
get_plan_itemGet full details of a plan item by ID
propose_planGenerate a complete experimental plan from a research goal
get_plan_statusGet campaign status with phase breakdown and progress
batch_update_statusUpdate status of multiple plan items at once
batch_update_specUpdate imaging/bench spec fields for multiple items
move_plan_itemMove a plan item to a different campaign or phase
delete_plan_itemDelete a plan item
reorder_plan_itemsReorder plan items within a campaign/phase
update_phaseUpdate phase metadata (title, description, phase_number)
delete_phaseDelete a phase and all its plan items
export_planExport a campaign as structured YAML/JSON
snapshot_planCreate a named snapshot of the current plan state
list_plan_versionsList saved plan snapshots for a campaign
restore_plan_versionRestore a plan from a saved snapshot

Lab Context (lab_context.py)

ToolDescription
query_lab_historySearch past sessions, campaigns, and learnings for relevant context
check_hardware_capabilityCheck if the current hardware supports a requested capability

Research (research.py)

ToolDescription
search_literatureSearch scientific literature (PubMed) for relevant papers
search_strainsSearch strain/gene databases (WormBase, NCBI Gene)
read_paperFetch and summarize a paper by DOI or PubMed ID

Templates (templates.py)

ToolDescription
save_plan_templateSave the current campaign as a reusable template
list_templatesList all saved plan templates
apply_templateCreate new campaign from a saved template with optional overrides

Validation (validation.py)

ToolDescription
validate_planValidate a plan for errors and warnings (hardware limits, dependencies, completeness)