Skip to main content
Glama
milliomics

millimap-mcp

Official
by milliomics

list_rois

Retrieve all regions of interest saved in the current MilliMap session.

Instructions

List all ROIs saved in the current MilliMap session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `list_rois` tool handler: decorated with @mcp.tool(), calls _load_snapshot() to read the MCP session file and returns the 'rois' array formatted as JSON via _fmt_json().
    @mcp.tool()
    def list_rois() -> str:
        """List all ROIs saved in the current MilliMap session."""
        return _fmt_json(_load_snapshot().get("rois", []))
  • The `list_rois` tool is registered via the `@mcp.tool()` decorator on the `FastMCP` instance named `mcp`, defined at line 22.
    @mcp.tool()
    def list_rois() -> str:
        """List all ROIs saved in the current MilliMap session."""
        return _fmt_json(_load_snapshot().get("rois", []))
  • The `_load_snapshot()` helper reads the MCP session JSON file (at ~/.millimap/mcp_session.json) and returns its contents as a dict. This is what `list_rois` calls to get the 'rois' array.
    def _load_snapshot() -> dict[str, Any]:
        if not SNAPSHOT_PATH.exists():
            return {
                "error": "no_snapshot",
                "message": (
                    f"No MilliMap snapshot found at {SNAPSHOT_PATH}. "
                    "Is MilliMap running with a dataset loaded?"
                ),
            }
        try:
            with SNAPSHOT_PATH.open("r") as f:
                return json.load(f)
        except Exception as exc:
            return {"error": "read_failed", "message": str(exc)}
  • The `_fmt_json()` helper serializes a Python object to an indented JSON string, used to format the output of `list_rois`.
    def _fmt_json(payload: Any) -> str:
        return json.dumps(payload, indent=2, default=str)
  • The `list_rois` tool takes no arguments (no input schema) and returns a string (JSON output). The shape comes from the snapshot's 'rois' key which is an array.
    @mcp.tool()
    def list_rois() -> str:
        """List all ROIs saved in the current MilliMap session."""
        return _fmt_json(_load_snapshot().get("rois", []))
Behavior3/5

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

With no annotations provided, the description carries full burden. It correctly implies a read-only listing operation but does not disclose potential session dependencies or output format limitations.

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 clear sentence with no wasted words. It is front-loaded and efficient.

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?

The description adequately explains what the tool does given the simple nature of listing all ROIs in the current session. However, it does not mention what properties are returned, though an output schema likely covers that.

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?

There are zero parameters, so schema coverage is complete. The description does not need to add parameter details, making the baseline score of 4 appropriate.

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 verb 'list' and the resource 'ROIs' in the context of the current MilliMap session. This distinguishes it from sibling tools like list_analysis_cards or get_cluster_markers.

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 explicit guidance on when to use this tool vs alternatives or when not to use it. The description implies it is for listing ROIs but offers no contextual advice.

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