Forge Tools mgnify_microbiome

mgnify_microbiome read

scidex.forge.mgnify_microbiome

Query EBI MGnify (ebi.ac.uk/metagenomics) for microbiome study and sample metadata. MGnify is the primary public microbiome database with 700K+ samples and 70K+ studies covering gut, soil, marine, skin, and other biomes. Accepts a study accession (MGYS00002008) for direct lookup, or a free-text search term (e.g. 'gut', 'soil carbon') with optional biome filtering. Returns study name, biome lineage, sample count, last-update date, and data-origination label. API: GET https://www.ebi.ac.uk/metagenomics/api/v1/studies — free, no authentication required.

HTTP: POST /api/scidex/forge/mgnify_microbiome

Invoke

Calls scidex.tool.invoke on the substrate with this tool name. Edit the JSON below — it must match the input schema. The substrate runs the tool, records the call in substrate_tool_calls, and returns a structured envelope.

Sign in to invoke this tool. Schema and curl snippet are visible to anyone.

Schemas

Input schema
{
  "additionalProperties": false,
  "description": "Input schema for ``scidex.forge.mgnify_microbiome``.",
  "properties": {
    "query": {
      "description": "Study accession (e.g. MGYS00002008) or free-text search term (e.g. 'gut', 'soil carbon', 'infant microbiome').",
      "maxLength": 200,
      "title": "Query",
      "type": "string"
    },
    "biome_filter": {
      "default": "",
      "description": "Optional biome name to filter results (e.g. 'Human', 'Soil', 'Marine'). Passed as the ``biome_name`` query parameter to MGnify.",
      "maxLength": 200,
      "title": "Biome Filter",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of studies to return (default 10, max 100).",
      "maximum": 100,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "query"
  ],
  "title": "ForgeMgnifyIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "MgnifyStudy": {
      "description": "One MGnify study record.",
      "properties": {
        "accession": {
          "description": "MGnify study accession (e.g. MGYS00002008).",
          "title": "Accession",
          "type": "string"
        },
        "study_name": {
          "description": "Human-readable study title.",
          "title": "Study Name",
          "type": "string"
        },
        "biome": {
          "default": "",
          "description": "Biome lineage for the study (e.g. 'root:Host-associated:Human:Digestive system:Large intestine').",
          "title": "Biome",
          "type": "string"
        },
        "samples_count": {
          "default": 0,
          "description": "Number of samples in the study.",
          "title": "Samples Count",
          "type": "integer"
        },
        "last_update": {
          "default": "",
          "description": "ISO-8601 date of the most recent update (e.g. '2023-04-12').",
          "title": "Last Update",
          "type": "string"
        },
        "data_origination": {
          "default": "",
          "description": "Data origin label as reported by MGnify (e.g. 'SUBMITTED', 'HARVESTED').",
          "title": "Data Origination",
          "type": "string"
        }
      },
      "required": [
        "accession",
        "study_name"
      ],
      "title": "MgnifyStudy",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.mgnify_microbiome``.",
  "properties": {
    "query": {
      "description": "The original query string.",
      "title": "Query",
      "type": "string"
    },
    "studies": {
      "description": "MGnify studies matching the query.",
      "items": {
        "$ref": "#/$defs/MgnifyStudy"
      },
      "title": "Studies",
      "type": "array"
    },
    "not_found": {
      "default": false,
      "description": "True when no studies were found for the given query.",
      "title": "Not Found",
      "type": "boolean"
    },
    "took_ms": {
      "default": 0,
      "description": "Wall-clock time for upstream API calls in milliseconds.",
      "title": "Took Ms",
      "type": "integer"
    }
  },
  "required": [
    "query"
  ],
  "title": "ForgeMgnifyOut",
  "type": "object"
}

curl snippet

Replace $SCIDEX_JWT with a valid bearer token. Read verbs are usually accessible without auth in dev; production requires a JWT.

curl -sS -X POST '/api/scidex/forge/mgnify_microbiome' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "query": ""
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.