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, }

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