Skip to main content
Glama

analyze_cell_communication

DestructiveIdempotent

Analyze cell-cell communication and ligand-receptor interaction patterns.

Instructions

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']).

Input Schema

NameRequiredDescriptionDefault
paramsYes
data_idYes

Output Schema

NameRequiredDescriptionDefault
methodYes
data_idYes
speciesYes
databaseYes
warningsNoNon-fatal conditions that may affect result interpretation.
n_lr_pairsYes
results_keyNoccc
top_lr_pairsNo
analysis_typeYes
n_obs_analyzedNo
n_autocrine_loopsNo
n_significant_pairsYes
top_autocrine_loopsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.6.0
    • addedInput schema / $defs / CellCommunicationParameters / properties / subset_categories
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Values of subset_key to keep, e.g. ['TC', 'LE'].",
      +  "title": "Subset Categories"
      +}
    • addedInput schema / $defs / CellCommunicationParameters / properties / subset_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "obs column that restricts the analysis to observations whose value is in subset_categories (e.g. 'tc_le_region'). Set both or neither.",
      +  "title": "Subset Key"
      +}
    • addedOutput schema / properties / n_obs_analyzed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "N Obs Analyzed"
      +}
  2. Changed1 schema field changedv1.5.3
    • changedInput schema / $defs / CellCommunicationParameters / properties / method / default
      Previous value: -"fastccc"New value: +"liana"
  3. Changed7 schema fields changedv1.3.2
    • addedInput schema / $defs / CellCommunicationParameters / additionalProperties
      Added value: +false
    • changedInput schema / $defs / CellCommunicationParameters / properties / cellphonedb_debug_seed / anyOf
      Previous value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / $defs / CellCommunicationParameters / properties / cellphonedb_debug_seed / description
      Added value: +"Optional CellPhoneDB testing seed. Enabling it forces single-threaded permutations because the upstream seed contract is single-thread only."
    • 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"
      +}
  4. First observedv1.2.7

TDQS

B3.2/5.0
Behavior2/5

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

Annotations declare destructiveHint=true, openWorldHint=true and readOnlyHint=false, yet the description says nothing about what is written, what may be overwritten, or where results go. For a long-running permutation-based analysis (1000 iterations default) it also omits runtime/cost expectations, so the most consequential behaviors are left entirely to the annotations.

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

Conciseness3/5

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

Short and front-loaded with the purpose, but the pseudo-docstring 'Args:' block wastes a line restating data_id, and the subset_key sentence is dangling after it with no framing. Content is minimal but the ordering is slightly disjointed.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and the description covers the required inputs plus the most error-prone configuration choices. What remains missing is guidance on spatial vs cluster mode and the destructive/write behavior, but the essentials for invoking it correctly are present.

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

Parameters3/5

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

The description highlights the required params (species, cell_type_key, method) and adds a genuinely useful dependency rule (mouse + liana → liana_resource='mouseconsensus', subset_key paired with subset_categories). But the params object carries dozens of method-specific knobs that the description never characterizes, and the 'data_id: Dataset ID' line merely restates the schema.

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 and resource: 'Analyze cell-cell communication and ligand-receptor interaction patterns', which is clearly distinct from siblings like analyze_enrichment or analyze_trajectory_data. However it does not explicitly distinguish itself from analyze_spatial_statistics or note that it can run in both cluster and spatial modes.

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

Usage Guidelines3/5

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

Offers practical routing hints ('For mouse with liana, set liana_resource=mouseconsensus') and a filtering example, but never says when to choose this tool over alternatives or when to enable/disable spatial analysis. Usage is implied rather than stated.

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