PalmSens Potentiostat

v0.1.3
io.github.K-Dense-AI/labmcp-palmsens Checked 1 day ago Published 2 months ago

MCP server for PalmSens potentiostats running MethodSCRIPT (EmStat Pico, EmStat4, Sensit, Nexus).

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

get_connection_info Get Connection Info

Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first.

get_command_log Get Command Log

Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done.

ParameterTypeDescription
limitinteger

reconnect Reconnect

Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged).

get_device_info Get Device Info

Identify the potentiostat (model, firmware, serial number) and list its potential window, PGStat modes and current ranges, so measurement parameters can be chosen within them.

run_cyclic_voltammetry Run Cyclic Voltammetry

Run a cyclic voltammogram: begin -> vertex 1 -> vertex 2 -> begin, `n_scans` times, and return potential/current/time data with the anodic and cathodic peaks of every scan. Applies potential to the cell for the whole scan; the cell is switched off at the end.

ParameterTypeDescription
begin_potential_v *numberStart (and end) potential, V vs RE
vertex1_potential_v *numberFirst vertex, V vs RE
vertex2_potential_v *numberSecond vertex, V vs RE
autorangebooleanLet the instrument switch to lower current ranges automatically
current_range_anumberHighest expected |current| in A; sets the (maximum) current range
equilibration_snumberSeconds to hold the begin potential before the technique starts
max_pointsintegerMaximum number of points to return
n_scansintegerNumber of cycles
save_pathWrite every point to this new .csv file (optional; never overwrites a file)
scan_rate_v_snumberScan rate, V/s
step_potential_vnumberPotential step, V

run_linear_sweep_voltammetry Run Linear Sweep Voltammetry

Run a linear sweep voltammogram from `begin_potential_v` to `end_potential_v` and return the data with the largest/smallest current and where they occur. Applies potential to the cell.

ParameterTypeDescription
begin_potential_v *numberStart potential, V vs RE
end_potential_v *numberEnd potential, V vs RE
autorangebooleanLet the instrument switch to lower current ranges automatically
current_range_anumberHighest expected |current| in A; sets the (maximum) current range
equilibration_snumberSeconds to hold the begin potential before the technique starts
max_pointsintegerMaximum number of points to return
save_pathWrite every point to this new .csv file (optional; never overwrites a file)
scan_rate_v_snumberScan rate, V/s
step_potential_vnumberPotential step, V

run_differential_pulse_voltammetry Run Differential Pulse Voltammetry

Run differential pulse voltammetry (current = forward - reverse, per step) from begin to end potential and return the data with the peak current and peak potential. The scan rate must be below step / pulse_time / 2. Applies potential to the cell.

ParameterTypeDescription
begin_potential_v *numberStart potential, V vs RE
end_potential_v *numberEnd potential, V vs RE
autorangebooleanLet the instrument switch to lower current ranges automatically
current_range_anumberHighest expected |current| in A; sets the (maximum) current range
equilibration_snumberSeconds to hold the begin potential before the technique starts
max_pointsintegerMaximum number of points to return
pulse_potential_vnumberPulse amplitude, V (absolute)
pulse_time_snumberPulse duration, s
save_pathWrite every point to this new .csv file (optional; never overwrites a file)
scan_rate_v_snumberScan rate, V/s
step_potential_vnumberPotential step, V

run_chronoamperometry Run Chronoamperometry

Hold the cell at `potential_v` for `run_time_s` and record the current every `interval_s`. Returns the data (time from the instrument timer) plus first/last/mean current and the charge. Applies potential to the cell.

ParameterTypeDescription
potential_v *numberApplied DC potential, V vs RE
run_time_s *numberTotal measurement time, s
autorangebooleanLet the instrument switch to lower current ranges automatically
current_range_anumberHighest expected |current| in A; sets the (maximum) current range
equilibration_snumberSeconds to hold the begin potential before the technique starts
interval_snumberTime between points, s
max_pointsintegerMaximum number of points to return
save_pathWrite every point to this new .csv file (optional; never overwrites a file)

run_methodscript Run Methodscript

Advanced: run a raw MethodSCRIPT and return its raw output and decoded data packages. Literal potentials of set_e / set_range_minmax da and the CV, LSV, DPV, SWV, NPV, ACV, CA, PAD, EIS and fast CV/CA techniques are checked against `max_potential_v`, and literal `set_range ba` / `set_autoranging ba` currents against `max_current_range_a`; values computed at run time are not. Aborted after `timeout_s`; add `on_finished:` + `cell_off` to your script so the cell is switched off after an abort. After a runtime error, a timeout or `abort_measurement` the server switches the cell off itself.

ParameterTypeDescription
script *stringMethodSCRIPT, one command per line (a leading 'e' line is ignored)
max_linesintegerMaximum output lines/packages to return
timeout_snumberAbort the script after this

abort_measurement Abort Measurement

Abort the running measurement or script immediately (communication command Z) and make sure the cell is switched off. Safe to call when nothing is running.