Skip to main content
Glama
MCP GeneLab Server

MCP GeneLab Server

by sbl-sdsc

find_common_differentially_expressed_genes

Read-onlyIdempotent

Identifies shared differentially expressed genes across multiple assays by intersecting upregulated and downregulated gene sets filtered by log2FC and adjusted p-value thresholds.

Instructions

USE THIS TOOL (not the query tool) for any "common DEGs across assays", "genes upregulated in BOTH assays", "shared up/downregulated genes", or any cross-assay DE intersection question. Falling back to query for this category reproduces the per-assay fetch + inner-join logic this tool already does correctly (parallel fetches via the driver's connection pool, |log2fc| > threshold filtering, separate up vs. down intersections) and loses the formatted markdown tables, the inline CSV side-channel, and the assay-reference legend.

Find common differentially expressed genes across multiple assays.

This function:

  1. Takes a list of assay IDs as input (2 or more)

  2. Gets ALL genes with |log2fc| > threshold for each assay

  3. Inner joins among the upregulated genes and among the downregulated genes

  4. Returns a markdown table with columns: gene, assay_1, assay_2, ..., assay_n showing log2fc values

Input Schema

NameRequiredDescriptionDefault
assay_idsYesList of assay identifiers (e.g., ['OSD-253-abc123', 'OSD-253-def456'])
session_idNoSession id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on every tool call. If the server replies that the session is unknown or expired, call `create_session()` again and use the new id.
adj_p_thresholdNoAdjusted p-value threshold for significance (default: 0.05, max value: 0.1)
log2fc_thresholdNoLog2 fold change threshold for filtering genes (default: 1.0 = 2-fold change)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / properties / session_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on every tool call. If the server replies that the session is unknown or expired, call `create_session()` again and use the new id.",
      +  "title": "Session Id"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "Annotations": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "audience": {
      -          "anyOf": [
      -            {
      -              "items": {
      -                "enum": [
      -                  "user",
      -                  "assistant"
      -                ],
      -                "type": "string"
      -              },
      -              "type": "array"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "default": null,
      -          "title": "Audience"
      -        },
      -        "priority": {
      -          "anyOf": [
      -            {
      -              "maximum": 1,
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "default": null,
      -          "title": "Priority"
      -        }
      -      },
      -      "title": "Annotations",
      -      "type": "object"
      -    },
      -    "TextContent": {
      -      "additionalProperties": true,
      -      "description": "Text content for a message.",
      -      "properties": {
      -        "_meta": {
      -          "anyOf": [
      -            {
      -              "additionalProperties": true,
      -              "type": "object"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "default": null,
      -          "title": "Meta"
      -        },
      -        "annotations": {
      -          "anyOf": [
      -            {
      -              "$ref": "#/$defs/Annotations"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "default": null
      -        },
      -        "text": {
      -          "title": "Text",
      -          "type": "string"
      -        },
      -        "type": {
      -          "const": "text",
      -          "title": "Type",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "type",
      -        "text"
      -      ],
      -      "title": "TextContent",
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "result": {
      -      "items": {
      -        "$ref": "#/$defs/TextContent"
      -      },
      -      "title": "Result",
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "find_common_differentially_expressed_genesOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.4.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, openWorld=false), but the description goes well beyond that: it discloses the internal algorithm (parallel fetches via a connection pool, |log2fc| threshold filtering, separate up/down intersections) and the return format (markdown table, inline CSV side-channel, assay-reference legend). Since there is no output schema, this disclosure carries real weight.

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?

The routing guidance is front-loaded, which is the right priority, but the closing paragraph ('Find common differentially expressed genes across multiple assays' followed by the numbered steps) partly restates the opening sentence. Efficient overall, with one redundant segment.

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?

With no output schema, the description correctly compensates by describing the returned table's columns, plus CSV and legend side-channels. The one soft spot is that the two distinct thresholds (adjusted p-value vs. log2fc) are not clearly separated in the prose, leaving adj_p_threshold semantics to the schema alone.

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 every parameter is already documented in the schema; this establishes the baseline of 3. The description adds context for the log2fc threshold (used as '|log2fc| > threshold') but says nothing about adj_p_threshold beyond the generic step-2 'threshold' phrasing, and nothing new about session_id or assay_ids.

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?

States a specific verb and resource ('Find common differentially expressed genes across multiple assays') and names the exact sibling it is not ('not the `query` tool'). An agent can distinguish it from query and from find_differentially_expressed_genes without opening any schema.

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?

Explicitly enumerates trigger phrasings ('common DEGs across assays', 'genes upregulated in BOTH assays') and names the alternative (`query`), including what is lost by using the wrong tool. This is as close to unambiguous routing guidance as it gets.

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