Skip to main content
Glama

ccc_dot_plot

Visualize cell-cell communication interactions from single-cell RNA sequencing data using a dot plot to analyze signaling pathways between cell types.

Instructions

Visualize cell-cell communication interactions using a dotplot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uns_keyNoKey in adata.uns that contains the LIANA results.liana_res
specificity_cutoffNoSpecificity or p-value threshold for filtering results.
colourNoColumn in liana_res to define the colours of the dots.
sizeNoColumn in liana_res to define the size of the dots.
source_labelsNoList of labels to use as source, the rest are filtered out.
target_labelsNoList of labels to use as target, the rest are filtered out.
top_nNoTop N entities to plot.
orderbyNoIf top_n is not None, order the interactions by this column.
orderby_ascendingNoIf top_n is not None, specify how to order the interactions.
orderby_absoluteNoIf top_n is not None, whether to order by the absolute value of the orderby column.
ligand_complexNoList of ligand complexes to filter the interactions to be plotted.
receptor_complexNoList of receptor complexes to filter the interactions to be plotted.
inverse_colourNoWhether to -log10 the colour column for plotting.
inverse_sizeNoWhether to -log10 the size column for plotting.
cmapNoColour map to use for plotting.viridis
size_rangeNoDefine size range. Tuple of (min, max) integers.
figure_sizeNoFigure x,y size.

Implementation Reference

  • The handler function that executes the ccc_dot_plot tool logic. It prepares filtered kwargs and calls liana.pl.dotplot to generate the dotplot visualization.
    def plot_dotplot(adata, **kwargs):
        pval = kwargs.pop("specificity_cutoff", 0.05)
        res_key = kwargs.get("uns_key", "liana_res")
        pval_col = adata.uns[res_key].columns[-1]
        kwargs["filter_fun"] = lambda x: x[pval_col] <= pval
    
        if kwargs.get("colour", None) is None:
            kwargs["colour"] = adata.uns[res_key].columns[-2]
        if kwargs.get("size", None) is None:
            kwargs["size"] = adata.uns[res_key].columns[-1]        
    
        parameters = inspect.signature(li.pl.dotplot).parameters
        kwargs = {k: kwargs.get(k) for k in parameters if k in kwargs}    
        fig = li.pl.dotplot(adata, **kwargs)
        return fig
  • Pydantic model defining the input schema for the ccc_dot_plot tool, including parameters like uns_key, specificity_cutoff, colour, size, etc.
    class DotPlotModel(JSONParsingModel):
        """Input schema for LIANA's dotplot visualization for cell-cell communication networks."""
        
        uns_key: str = Field(
            default="liana_res",
            description="Key in adata.uns that contains the LIANA results."
        )
        
        specificity_cutoff: float = Field(
            default=0.05,
            description="specificity or pval threshold for filtering results. "
        )
            
        colour: Optional[str] = Field(
            default=None,
            description="Column in liana_res to define the colours of the dots."
        )
        
        size: Optional[str] = Field(
            default=None,
            description="Column in liana_res to define the size of the dots."
        )
        
        source_labels: Optional[Union[List[str], str]] = Field(
            default=None,
            description="List of labels to use as source, the rest are filtered out."
        )
        
        target_labels: Optional[Union[List[str], str]] = Field(
            default=None,
            description="List of labels to use as target, the rest are filtered out."
        )
        
        top_n: Optional[int] = Field(
            default=None,
            description="Top N entities to plot."
        )
        
        orderby: Optional[str] = Field(
            default=None,
            description="If top_n is not None, order the interactions by this column."
        )
        
        orderby_ascending: Optional[bool] = Field(
            default=None,
            description="If top_n is not None, specify how to order the interactions."
        )
        
        orderby_absolute: bool = Field(
            default=False,
            description="If top_n is not None, whether to order by the absolute value of the orderby column."
        )
        
        ligand_complex: Optional[Union[List[str], str]] = Field(
            default=None,
            description="List of ligand complexes to filter the interactions to be plotted."
        )
        
        receptor_complex: Optional[Union[List[str], str]] = Field(
            default=None,
            description="List of receptor complexes to filter the interactions to be plotted."
        )
        
        inverse_colour: bool = Field(
            default=False,
            description="Whether to -log10 the colour column for plotting."
        )
        
        inverse_size: bool = Field(
            default=False,
            description="Whether to -log10 the size column for plotting."
        )
        
        cmap: str = Field(
            default="viridis",
            description="Colour map to use for plotting."
        )
        
        size_range: Tuple[int, int] = Field(
            default=(2, 9),
            description="Define size range. Tuple of (min, max) integers."
        )
        
        figure_size: Tuple[float, float] = Field(
            default=(8, 6),
            description="Figure x,y size."
        )
        
        specificity_cutoff: float = Field(
            default=0.05,
            description="Specificity or p-value threshold for filtering results."
        )
  • Definition of the MCP Tool object for ccc_dot_plot, including name, description, and input schema.
    dot_plot_tool = types.Tool(
        name="ccc_dot_plot",
        description="Visualize cell-cell communication interactions using a dotplot.",
        inputSchema=DotPlotModel.model_json_schema(),
    )
  • ccc_tools dictionary that maps tool names to Tool objects, including ccc_dot_plot.
    ccc_tools = {
        "ls_ccc_method": ls_ccc_method_tool,
        "ccc_rank_aggregate": rank_aggregate_tool,
        "ccc_circle_plot": circle_plot_tool,
        "ccc_dot_plot": dot_plot_tool,
        "ccc": ccc_tool,
    }
  • In list_tools(), the ccc_tools are included in the list of available tools returned by the MCP server.
    tools = [
        *io_tools.values(),
        *pp_tools.values(),
        *tl_tools.values(),
        *pl_tools.values(),
        *util_tools.values(),
        *ccc_tools.values(),
    ]
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a visualization, implying a read-only operation, but doesn't cover critical aspects like whether it modifies the input data, requires specific data formats, has performance considerations, or what the output looks like (e.g., a plot object or file). For a complex tool with 17 parameters, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence: 'Visualize cell-cell communication interactions using a dotplot.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for a tool where detailed information is handled by the schema. Every word earns its place.

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?

Given the tool's complexity (17 parameters, no annotations, no output schema), the description is incomplete. It lacks information on behavioral traits, usage context, output format, and dependencies. While the schema covers parameters well, the description fails to provide the broader context needed for effective tool selection and invocation, especially for a visualization tool where understanding the output is crucial.

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 schema description coverage is 100%, meaning all parameters are well-documented in the input schema itself. The description adds no additional parameter semantics beyond the schema, such as explaining how parameters interact or typical values. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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?

The description clearly states the tool's purpose: 'Visualize cell-cell communication interactions using a dotplot.' It specifies the action ('visualize') and the resource ('cell-cell communication interactions'), and the dotplot method distinguishes it from other visualization tools like ccc_circle_plot or pl_heatmap. However, it doesn't explicitly differentiate from pl_dotplot, which might be a sibling tool for general dotplots, leaving some ambiguity.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites (e.g., requiring LIANA results in adata.uns), compare it to other visualization methods like ccc_circle_plot, or specify typical use cases. This lack of context makes it harder for an agent to decide when this tool is appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/huang-sh/scmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server