PASCO Capstone MCP

v0.1.3
io.github.ji5zi5/pasco-capstone-mcp Checked 1 day ago Published 3 days ago

Control PASCO Capstone, extract .cap/CSV data, and run physics analysis & reports.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

capstone_attach

Attach to installed Capstone, optionally selecting an exact process ID.

ParameterTypeDescription
launchboolean
process_id

capstone_windows

List Capstone windows, including file dialogs and modal dialogs.

capstone_snapshot

Read control names, roles, bounds, and fresh action references. A full experiment window holds hundreds of controls. Pass query, a case-insensitive substring of a control's name or automation_id, and/or control_types such as ["Button", "CheckBox"] to return only the matches. depth and limit still bound the traversal, so truncated=true means an unvisited control may match. Custom-drawn graph toolbars are not exposed.

ParameterTypeDescription
handle *integer
control_types
depthinteger
limitinteger
querystring

capstone_screenshot

Capture PNG pixels at native resolution, optionally scaled or cropped. Does not raise the target window to the foreground.

ParameterTypeDescription
handle *integer
crop_region
scalenumber

capstone_interact_ui

Consolidated UI interaction escape hatch for unmodeled modals and controls. Dispatches low-level mouse, keyboard, and UIA primitives: - click / double_click: Physical click at point coordinates - drag: Drag mouse from start to end coordinates - scroll: Wheel scroll by specified notches at point - keys: Send pywinauto shortcut key sequences ({ENTER}, {ESC}, etc.) - type: Type literal Unicode text into focused field - action: Perform UIA action (invoke, toggle, select, expand, collapse, focus) on control ref - read_value: Read current text value of control ref (returned in Result.detail) - se…

ParameterTypeDescription
action *stringLow-level UI action to perform.
allow_foregroundbooleanWhether to bring window to foreground for physical input.
buttonMouse button (left, right, middle).
endEnd coordinate for drag.
handleintegerTarget window handle (for mouse/keyboard actions).
keysPywinauto key shortcut string, e.g. '{ENTER}', '^o'.
notchesintegerWheel scroll notches (positive=up).
pointRequired coordinate for click, double_click, or scroll.
refControl ref from capstone_snapshot (for action, read_value, set_value).
startStart coordinate for drag.
textLiteral text to type into focused control.
ui_actionUIA action for 'action' type: invoke, toggle, select, expand, collapse, focus.
valueLiteral text value to set via UIA Value pattern.

capstone_save_experiment

Save As to a new .cap path and verify the completed archive. Never overwrites an existing file. The active experiment adopts the new path. Close existing dialogs before calling.

ParameterTypeDescription
handle *integer
path *string
allow_foregroundboolean
workflow_labels

capstone_open_experiment

Open an existing .cap in the attached Capstone, replacing its document. Uses File > Open Experiment and confirms the result by the window title. Prefer this to typing Ctrl+O and a path, which Capstone can ignore while it is still starting. Refuses when the current experiment has unsaved changes (title ends with *) unless discard_unsaved=true, which answers the save prompt with Discard. Close existing dialogs before calling.

ParameterTypeDescription
handle *integer
path *string
allow_foregroundboolean
discard_unsavedboolean
workflow_labels

capstone_export_data

Read unsaved data by native CSV export to a new path, without saving .cap. Selects all data and aligns by index. CSV uses Capstone's configured display precision, not lossless cache values. Headers preserve native labels; source IDs and time alignment are not inferred. The entire CSV remains at path.

ParameterTypeDescription
handle *integer
path *string
allow_foregroundboolean
limitinteger
offsetinteger
workflow_labels

capstone_inspect_file

Read saved .cap hardware/settings, source metadata, pages and calculations. Does not open the file in Capstone or infer live hardware connectivity. Array decoding is independent, so unknown recorded storage types do not prevent configuration inspection. The complete result is often several hundred thousand characters, mostly workspace (page layout) and data_sources. Pass sections to read only what is needed, e.g. ["hardware_interfaces", "experiment_settings"]. Sections not requested are null and named in omitted_sections; omit sections for all.

ParameterTypeDescription
path *string
sections

capstone_file_datasets

List saved dataset metadata without decoding sample arrays. run_name/run_number identify the recorded run a dataset belongs to; datasets of one run share its dataset_id across sources. Pair x and y by that run. Supports type-7 strings and type-0 tagged doubles, with stored, interval, or implicit-index independent coordinates. Unsupported array encodings raise an error instead of reporting empty data.

ParameterTypeDescription
path *string

capstone_extract_dataset

Extract one sample page from a saved dataset, preserving original text. Numeric decimals are serialized losslessly as decimal strings. Implicit sample_indices are indices, not seconds. Use list tools to select the dataset.

ParameterTypeDescription
dataset_index *integer
path *string
limitinteger
offsetinteger

capstone_manage_graph

Unified entry point for all Capstone graph display operations. Supported actions (request.action): - create: Insert a new graph onto active page (request.create) - read: Read graph curves, fits, and data signatures (request.read) Set request.read.cap_file to read a saved archive without the desktop. Set request.read.graph_index (zero-based workbook order) for multiple graphs. - observe: Capture a fresh screenshot and one-use frame_id (request.observe, requires allow_foreground=true) - fit: Scale graph axes using an observed offset and frame_id (request.fit) - select_measurement: Select…

capstone_manage_display

Unified entry point for all Capstone display and workbook operations. Supported actions (request.action): - create_digits: Insert Digits display and monitor numeric readout - create_table: Insert Table display widget on active page - set_table_columns: Configure measurement columns for Table display - read_table: Extract tabular rows, pagination, and statistics - create_scope: Insert Oscilloscope display widget - set_scope_trigger: Configure scope hardware trigger level/slope/mode - create_fft: Insert FFT frequency spectrum display - read_fft_peaks: Read detected spectral peak frequencies and…

ParameterTypeDescription
request *

capstone_manage_instrument

Unified compound entry point for all Capstone instrument operations. Supported actions (request.action): - set_sampling_rate: Navigate sensor rate or select sensor (request.set_sampling_rate) - zero_sensor: Zero or tare connected sensors (request.zero_sensor) - configure_signal_generator: Configure generator or read status (request.configure_signal_generator) - set_recording_condition: Configure start/stop threshold triggers (request.set_recording_condition) - set_sampling_mode: Switch sampling mode (continuous, keep_sample) (request.set_sampling_mode) - keep_sample: Log discrete point in man…

ParameterTypeDescription
request *

capstone_guide

Return targeted instructions for common Capstone workflow scenarios. Clients may truncate the server instructions, which therefore carry only the essentials. Topics: workflow, files, graphs, graph_contract, windows, sensors, save_export, recording, recovery. Omit topic for all of them.

ParameterTypeDescription
topic

capstone_plot

Render a scatter/line plot of labeled numerical samples as a PNG image. Generates an inline plot directly from numeric data points, without modifying the Capstone document workspace.

ParameterTypeDescription
samples *

capstone_linear_fit

Run standard OLS linear regression (y = slope*x + intercept) on points.

ParameterTypeDescription
samples *

capstone_compare_runs

Group and compare sample metrics across multiple named experimental runs.

ParameterTypeDescription
runs *array

capstone_create_calculation

Register a formula and optional unit in Capstone Calculator with auto-cleanup. Args: expression: Mathematical formula (e.g. 'KE = 0.5 * [Mass] * [Velocity]^2'). handle: Capstone main window handle (0 for active window). unit: Optional physical unit string for the computed variable (e.g. 'J'). allow_foreground: Bring window to foreground for UI automation. keep_open: Leave calculator side drawer open after registration. Returns: CreateCalculationResult with created variable name, formula, and status.

ParameterTypeDescription
expression *string
allow_foregroundboolean
handleinteger
keep_openboolean
unit

capstone_generate_lab_report

Generate a formal physics laboratory report from experiment data. Ingests data from a .cap archive, CSV file, or JSON payload, computes summary statistics, regression parameters (slope, intercept, R^2), performs error analysis against accepted theoretical physical constants (e.g. Planck's constant h, resonant frequency f_0, adiabatic index gamma), generates ASCII plots, and renders publication-ready Markdown and HTML. Args: file_path_or_run: .cap archive, CSV/JSON file, inline JSON, or 'sample'. experiment_id: Canonical experiment identifier ('photoelectric_effect', 'rlc_reso…

ParameterTypeDescription
file_path_or_run *string
axes
experiment_idstring
formatstring
output_path
run_id

capstone_run_experiment_macro

Analyze supplied measurements for a supported physics experiment. Use action='analyze' with measured arrays in parameters. The supported experiment IDs are photoelectric_effect, rlc_resonance, forced_harmonic_oscillation (alias forced_oscillation), adiabatic_gas, slit_diffraction and polarization (alias malus). For example, photoelectric_effect accepts wavelengths_nm and stopping_voltages_v. 'acquire' accepts previously recorded inputs. Automatic apparatus setup and live acquisition are unavailable. 'run' stops at the first failed phase. Inspect success, phase_results and error before report…

ParameterTypeDescription
experiment_id *string
actionstring
parameters

capstone_manage_run

Unified entry point for experimental run operations. Supported actions (request.action): - rename: Rename a specific Run in the Data Summary tree (request.rename) - delete: Delete the last recorded run (request.delete.run_name="last_run"). Open Sensor Data Summary before calling to verify the deletion. - set_visibility: Control visibility (show/hide) of specific runs (request.visibility)

ParameterTypeDescription
request *