Skip to main content
Glama

check_gene

Verify gene presence in single-cell RNA sequencing data before creating visualizations or coloring by genes, ensuring accurate analysis.

Instructions

Check if genes exist in adata.var_names. This tool should be called before gene expression visualizations or color by genes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
var_namesNogene names.

Implementation Reference

  • The core handler function that implements the check_gene tool: returns a dictionary {gene: exists} for each gene in var_names against adata.var_names.
    def check_gene(adata, var_names):
        return {v: v in adata.var_names for v in var_names}
  • Pydantic model defining the input schema for check_gene: expects a list of gene names (var_names).
    class VarNamesModel(JSONParsingModel):
        """ListObsModel"""    
        var_names: List[str] = Field(
                default=None,
                description="gene names."
            )
  • MCP Tool object creation for 'check_gene', specifying name, description, and input schema. This tool is later included in util_tools dict used by the server.
    check_gene_tool = types.Tool(
        name="check_gene",
        description="Check if genes exist in adata.var_names. This tool should be called before gene expression visualizations or color by genes.",
        inputSchema=VarNamesModel.model_json_schema(),
    )
  • util_tools dictionary that maps tool names to Tool instances, imported and used in server.py for MCP tool registration.
    util_tools = {
        "mark_var": mark_var_tool,
        "list_var": list_var_tool,
        "list_obs": list_obs_tool,  
        "check_gene": check_gene_tool,
        "merge_adata": merge_adata_tool,
    }
Behavior3/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 clearly indicates this is a validation/checking operation (non-destructive, likely read-only), but doesn't specify what happens when genes don't exist (error, warning, partial results), performance characteristics, or authentication requirements. It provides basic behavioral context but lacks operational details.

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 perfectly concise with two sentences that each earn their place: the first states the purpose, the second provides usage guidance. There's zero waste or redundancy, and information is front-loaded appropriately.

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?

For a simple validation tool with one parameter and no output schema, the description is reasonably complete. It covers purpose and usage context well. However, without annotations or output schema, it could benefit from mentioning what the tool returns (e.g., validation results, error messages) or any limitations. The lack of output information is a minor gap.

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?

Schema description coverage is 100%, so the schema already documents the single parameter 'var_names' as 'gene names.' The description adds minimal value beyond this by mentioning 'genes' in context, but doesn't provide additional semantic details about parameter format, constraints, or examples. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose5/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 with a specific verb ('Check if genes exist') and resource ('in adata.var_names'), making it immediately understandable. It distinguishes itself from sibling tools by focusing on gene existence validation rather than visualization, filtering, or analysis operations.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('before gene expression visualizations or color by genes'), providing clear context for its application. It implies an alternative would be to proceed without validation, though it doesn't name specific sibling tools as alternatives.

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