Skip to main content
Glama
milliomics

millimap-mcp

Official
by milliomics

get_cluster_markers

Returns the top marker genes for a specific cell cluster. Provide the cluster identifier and optionally the number of top markers to retrieve.

Instructions

Return top marker genes for a specific cluster.

Args: cluster_id: Cluster identifier as a string (e.g., "0", "1", "CD8_T"). top_n: Number of top markers to return (default 10, max 15).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idYes
top_nNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler function for get_cluster_markers. Decorated with @mcp.tool(). Loads the snapshot, looks up markers for the given cluster_id, and returns top_n markers (max 15) along with any cell-type annotation.
    @mcp.tool()
    def get_cluster_markers(cluster_id: str, top_n: int = 10) -> str:
        """Return top marker genes for a specific cluster.
    
        Args:
            cluster_id: Cluster identifier as a string (e.g., "0", "1", "CD8_T").
            top_n: Number of top markers to return (default 10, max 15).
        """
        snap = _load_snapshot()
        if "error" in snap:
            return _fmt_json(snap)
        markers = snap.get("markers", {}).get(str(cluster_id))
        if not markers:
            return _fmt_json({
                "error": "not_found",
                "cluster_id": cluster_id,
                "available_clusters": sorted(snap.get("markers", {}).keys()),
            })
        annotation = snap.get("annotations", {}).get(str(cluster_id))
        return _fmt_json({
            "cluster_id": cluster_id,
            "annotation": annotation,
            "markers": markers[: max(1, min(top_n, 15))],
        })
  • The @mcp.tool() decorator registers get_cluster_markers as a tool on the FastMCP server instance.
    @mcp.tool()
  • Helper function _load_snapshot() loads the MilliMap session JSON snapshot. Used by the handler to read cluster markers, annotations, etc.
    def _fmt_json(payload: Any) -> str:
        return json.dumps(payload, indent=2, default=str)
  • Helper function _fmt_json() serializes a payload to pretty-printed JSON. Used by the handler to format the response.
    def _fmt_json(payload: Any) -> str:
        return json.dumps(payload, indent=2, default=str)
Behavior2/5

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

No annotations provided, so description carries full burden. It only states the action without disclosing side effects, ordering, or limitations. Output schema exists but is not described.

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?

Two sentences plus parameter list, no filler. Efficient and front-loaded with purpose. Could be slightly more structured, but very concise.

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

Completeness3/5

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

Given the simple tool and presence of output schema, the description covers the basics. However, it lacks context about when to use this vs sibling tools, which is a gap.

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

Parameters4/5

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

With 0% schema description coverage, the description adds meaning: explains cluster_id as a string with examples and top_n with default and max. This significantly helps the agent beyond the bare 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?

The description clearly states 'Return top marker genes for a specific cluster,' specifying verb and resource. However, it does not differentiate from sibling tools like find_markers, which may have similar purpose.

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 guidance on when to use this tool versus alternatives like find_markers or genes_for_cell_type. The description does not mention when-not or prerequisites.

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/milliomics/millimap-mcp'

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