Skip to main content
Glama

deconvolve_data

Destructive

Deconvolve spatial spots to estimate cell type proportions.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
paramsYes
data_idYes

Output Schema

NameRequiredDescriptionDefault
methodYes
data_idYes
n_spotsNo
warningsNoNon-fatal conditions that may affect result interpretation.
cell_typesYes
genes_usedNo
n_cell_typesYes
proportions_keyYes
dominant_type_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.5.10
    • addedInput schema / $defs / DeconvolutionParameters / properties / flashdeconv_lambda_spatial / anyOf
      Added value: +[
      +  {
      +    "const": "auto",
      +    "type": "string"
      +  },
      +  {
      +    "minimum": 0,
      +    "type": "number"
      +  }
      +]
    • changedInput schema / $defs / DeconvolutionParameters / properties / flashdeconv_lambda_spatial / default
      Previous value: -5000New value: +"auto"
    • changedInput schema / $defs / DeconvolutionParameters / properties / flashdeconv_lambda_spatial / description
      Previous value: -"Spatial regularization. 5000 for Visium, 50000+ for high-res. FlashDeconv only."New value: +"Spatial regularization: auto adapts to the data scale; 0 disables smoothing. FlashDeconv only."
    • removedInput schema / $defs / DeconvolutionParameters / properties / flashdeconv_lambda_spatial / exclusiveMinimum
      Removed value: -0
    • removedInput schema / $defs / DeconvolutionParameters / properties / flashdeconv_lambda_spatial / type
      Removed value: -"number"
    • changedInput schema / $defs / DeconvolutionParameters / properties / flashdeconv_sketch_dim / description
      Previous value: -"Sketched space dimension. FlashDeconv only."New value: +"Bucket count used to compute deterministic gene weights. FlashDeconv only."
  2. Changed25 schema fields changedv1.3.2
    • addedInput schema / $defs / DeconvolutionParameters / additionalProperties
      Added value: +false
    • removedInput schema / $defs / DeconvolutionParameters / properties / cell2location_early_stopping_threshold / exclusiveMinimum
      Removed value: -0
    • addedInput schema / $defs / DeconvolutionParameters / properties / cell2location_early_stopping_threshold / minimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / cell2location_gene_filter_cell_count_cutoff / minimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / cell2location_gene_filter_cell_percentage_cutoff2 / maximum
      Added value: +1
    • addedInput schema / $defs / DeconvolutionParameters / properties / cell2location_gene_filter_cell_percentage_cutoff2 / minimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / cell2location_gene_filter_nonz_mean_cutoff / minimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / destvi_dropout_rate / exclusiveMaximum
      Added value: +1
    • addedInput schema / $defs / DeconvolutionParameters / properties / destvi_dropout_rate / minimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / destvi_learning_rate / exclusiveMinimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / destvi_n_hidden / exclusiveMinimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / destvi_n_latent / exclusiveMinimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / destvi_n_layers / exclusiveMinimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / rctd_backend
      Added value: +{
      +  "default": "r",
      +  "description": "RCTD implementation. 'r' preserves the spacexr backend; 'python' uses rctd-py.",
      +  "enum": [
      +    "r",
      +    "python"
      +  ],
      +  "title": "Rctd Backend",
      +  "type": "string"
      +}
    • addedInput schema / $defs / DeconvolutionParameters / properties / rctd_batch_size
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "const": "auto",
      +      "type": "string"
      +    }
      +  ],
      +  "default": "auto",
      +  "description": "Spot batch size for the rctd-py backend, or 'auto'.",
      +  "title": "Rctd Batch Size"
      +}
    • addedInput schema / $defs / DeconvolutionParameters / properties / rctd_device
      Added value: +{
      +  "default": "auto",
      +  "description": "Compute device for the rctd-py backend. Ignored by the R backend.",
      +  "enum": [
      +    "auto",
      +    "cpu",
      +    "cuda"
      +  ],
      +  "title": "Rctd Device",
      +  "type": "string"
      +}
    • addedInput schema / $defs / DeconvolutionParameters / properties / rctd_dtype
      Added value: +{
      +  "default": "float64",
      +  "description": "Numerical precision for the rctd-py backend.",
      +  "enum": [
      +    "float64",
      +    "float32"
      +  ],
      +  "title": "Rctd Dtype",
      +  "type": "string"
      +}
    • addedInput schema / $defs / DeconvolutionParameters / properties / rctd_sigma_override
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional fixed sigma for rctd-py. None estimates sigma from the data.",
      +  "title": "Rctd Sigma Override"
      +}
    • addedInput schema / $defs / DeconvolutionParameters / properties / stereoscope_batch_size / exclusiveMinimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / stereoscope_learning_rate / exclusiveMinimum
      Added value: +0
    • addedInput schema / $defs / DeconvolutionParameters / properties / stereoscope_n_epochs / exclusiveMinimum
      Added value: +0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedOutput schema / additionalProperties
      Added value: +false
    • removedOutput schema / properties / statistics
      Removed value: -{
      -  "additionalProperties": true,
      -  "title": "Statistics",
      -  "type": "object"
      -}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "description": "Non-fatal conditions that may affect result interpretation.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Warnings",
      +  "type": "array"
      +}
  3. Changed3 schema fields changedv1.2.10
    • changedInput schema / $defs / DeconvolutionParameters / properties / spotlight_n_top_genes / default
      Previous value: -2000New value: +50
    • changedInput schema / $defs / DeconvolutionParameters / properties / spotlight_n_top_genes / description
      Previous value: -"Number of HVGs for deconvolution. SPOTlight only."New value: +"Marker genes per cell type for SPOTlight deconvolution."
    • changedInput schema / $defs / DeconvolutionParameters / properties / spotlight_n_top_genes / maximum
      Previous value: -5000New value: +500
  4. First observedv1.2.7

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false, so the agent knows this mutates state. The description adds nothing beyond that: no mention of runtime cost, GPU requirements (despite use_gpu param), reference data prerequisites, or that destructive behavior may involve writing/overwriting results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose sentence followed by a compact Args block. Efficient, though the Args block restates schema field names with little added value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, open-world tool with a large nested parameter object, the description omits prerequisites (must load a reference dataset first?), method selection guidance, and any behavioral caveats. The output schema existing removes the need to explain returns, but core missing context remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is effectively 0% at the top level; the description only names three nested fields (method, cell_type_key, reference_data_id) without explaining method tradeoffs, required reference loading, or which methods support what. It points the agent to DeconvolutionParameters without surfacing any of its ~60 options.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: 'Deconvolve spatial spots to estimate cell type proportions.' Clear and distinguishable from siblings like annotate_cell_types or identify_spatial_domains, though it doesn't explicitly contrast with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no prerequisites stated, no mention of choosing among the eight deconvolution methods beyond pointing out that method lives in params. No alternative tool is named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.