ChatSpatial
v1.7.0Schema-enforced spatial transcriptomics analysis with 20 tools and 67 methods via MCP
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
load_data
Load spatial transcriptomics data with comprehensive metadata profile. Args: data_path: Path to data file or directory data_type: 'visium', 'xenium', 'slide_seq', 'merfish', 'seqfish', or 'generic' name: Optional dataset name Returns: SpatialDataset with cell/gene counts and metadata profiles
| Parameter | Type | Description |
|---|---|---|
data_path * | string | |
data_type * | string | |
name |
preprocess_data
Run QC, filtering, normalization, and highly variable gene selection. This tool does not compute PCA, UMAP, clustering, or neighbor graphs. Run compute_embeddings() afterward when downstream tools require those artifacts. Args: data_id: Dataset ID params: Preprocessing parameters (all have sensible defaults)
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params |
compute_embeddings
Compute dimensionality reduction (PCA, UMAP), clustering, and neighbor graphs. Args: data_id: Dataset ID params: Embedding parameters (PCA, UMAP, clustering, etc.)
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params |
visualize_data
Visualize spatial transcriptomics data. Set plot_type and subtype in params; see VisualizationParameters schema for all options. Args: data_id: Dataset ID params: Visualization parameters (plot_type, subtype, genes, output_format, dpi, etc.)
annotate_cell_types
Annotate cell types in spatial transcriptomics data. Args: data_id: Dataset ID params: Annotation parameters (method, reference_data_id, cell_type_key, etc.) Note: Reference methods (tangram, scanvi) require reference_data_id to be preprocessed first. Rule-based methods: marker_score labels the groups of cluster_label (e.g. spatial domains) by mean log-normalized marker expression; threshold labels observations by a cutoff on a numeric obs column (e.g. deconvolution_rctd_<cell type>). Both write to output_key.
analyze_spatial_statistics
Analyze spatial statistics and autocorrelation patterns. Args: data_id: Dataset ID params: Analysis parameters (analysis_type, cluster_key, genes). See SpatialStatisticsParameters for all types. gene_selection='all' computes moran/geary for every gene; the full per-gene table (rank, statistic, p, FDR) is stored at results_key, only top genes are returned.
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params |
find_markers
Find differentially expressed genes between groups. Args: data_id: Dataset ID params: Required - group_key and optional method, group1/group2, n_top_genes, etc.
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params * |
compare_conditions
Compare experimental conditions using pseudobulk differential expression (DESeq2). Args: data_id: Dataset ID params: Required - condition_key, condition1, condition2, sample_key, etc.
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params * |
analyze_cnv
Analyze copy number variations (CNVs) in spatial transcriptomics data. Args: data_id: Dataset identifier params: Required - reference_key, reference_categories, and optional method/thresholds. Gene positions missing from adata.var are annotated from bundled Ensembl 110 tables (species: human GRCh38 or mouse GRCm39). exclude_gene_classes removes immunoglobulin, ribosomal, mitochondrial or HLA genes from the CNV input; query_categories restricts CNV clustering to those reference_key categories.
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params * |
analyze_velocity_data
Analyze RNA velocity to understand cellular dynamics. Requires 'spliced' and 'unspliced' layers. Args: data_id: Dataset ID params: Velocity parameters (method, scvelo_mode, etc.)
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params |
analyze_trajectory_data
Infer cellular trajectories and pseudotime ordering. Args: data_id: Dataset ID params: Trajectory parameters (method, root_cell, spatial_weight, etc.)
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params |
integrate_samples
Integrate multiple spatial transcriptomics samples into a unified dataset. Args: data_ids: List of dataset IDs to integrate params: Integration parameters (method, batch_key, n_pcs, etc.) batch_correction=False pools the samples without correction (shared genes, counts in layers['counts'], obs and coordinates kept), e.g. to pool sections for analyze_cell_communication.
| Parameter | Type | Description |
|---|---|---|
data_ids * | array | Two or more distinct dataset IDs. |
params |
deconvolve_data
Deconvolve spatial spots to estimate cell type proportions. Args: data_id: Dataset ID params: Required - method, cell_type_key, reference_data_id. See DeconvolutionParameters for all methods and options.
identify_spatial_domains
Identify spatial domains and tissue architecture. Args: data_id: Dataset ID params: Spatial domain parameters (method, n_domains, resolution, etc.)
analyze_cell_communication
Analyze cell-cell communication and ligand-receptor interaction patterns. Args: data_id: Dataset ID params: Required - species, cell_type_key, and method. For mouse with liana, set liana_resource='mouseconsensus'. subset_key + subset_categories restrict the analysis to those observations (e.g. tc_le_region in ['TC', 'LE']).
analyze_enrichment
Perform gene set enrichment analysis. Args: data_id: Dataset ID params: Required - species must be specified. See EnrichmentParameters for methods and gene_set_database options.
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params * |
find_spatial_genes
Identify spatially variable genes. Args: data_id: Dataset ID params: Spatial variable gene parameters (method, n_top_genes, etc.)
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
params |
register_spatial_data
Register/align spatial transcriptomics data across sections Args: source_id: Source dataset ID target_id: Target dataset ID to align to params: Registration parameters (method, alignment settings, etc.) Returns: Registration result with method, dataset IDs, spot counts, and registered spatial key
| Parameter | Type | Description |
|---|---|---|
source_id * | string | |
target_id * | string | |
params |
export_data
Export dataset to disk for external script access. Args: data_id: Dataset ID to export path: Custom path (default: ~/.chatspatial/active/{data_id}.h5ad) Returns: Absolute path where data was exported
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
path |
reload_data
Reload dataset from disk after external script modifications. Args: data_id: Dataset ID to reload (must exist in MCP memory) path: Custom path (default: ~/.chatspatial/active/{data_id}.h5ad) Returns: Summary of reloaded dataset
| Parameter | Type | Description |
|---|---|---|
data_id * | string | |
path |