Forge Tools chebi_compound

chebi_compound read

scidex.forge.chebi_compound

Query ChEBI (Chemical Entities of Biological Interest) by name, ChEBI ID, InChI, or SMILES. Returns curated chemical structures, molecular formula, charge, InChI/SMILES, ontology roles (metabolite, pharmaceutical, cofactor), synonyms, and cross-refs to PubChem/ChEMBL/UniProt. Free EBI webservices — no auth required.

HTTP: POST /api/scidex/forge/chebi_compound

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.chebi_compound``.",
  "properties": {
    "identifiers": {
      "description": "List of identifiers to look up. Interpreted as chemical names, ChEBI IDs (CHEBI:12345), InChI strings, or SMILES depending on ``search_type``.",
      "items": {
        "type": "string"
      },
      "maxItems": 50,
      "minItems": 1,
      "title": "Identifiers",
      "type": "array"
    },
    "search_type": {
      "default": "name",
      "description": "Query mode: ``name`` (default) | ``chebi_id`` | ``inchi`` | ``smiles``. All identifiers in the list use the same search_type.",
      "title": "Search Type",
      "type": "string"
    },
    "include_ontology": {
      "default": true,
      "description": "When True (default), populate the ``roles`` field from ChEBI ontologyParents (e.g. metabolite, pharmaceutical).",
      "title": "Include Ontology",
      "type": "boolean"
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of compounds to return across all identifiers.",
      "maximum": 100,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "identifiers"
  ],
  "title": "ForgeChebiIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "ChEBICrossRefsOut": {
      "description": "Cross-references for a ChEBI compound.",
      "properties": {
        "pubchem_cid": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "PubChem Compound ID.",
          "title": "Pubchem Cid"
        },
        "chembl_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ChEMBL identifier.",
          "title": "Chembl Id"
        },
        "uniprot_ids": {
          "description": "UniProt accession IDs.",
          "items": {
            "type": "string"
          },
          "title": "Uniprot Ids",
          "type": "array"
        }
      },
      "title": "ChEBICrossRefsOut",
      "type": "object"
    },
    "ChEBIEntry": {
      "description": "One ChEBI compound record in the response.",
      "properties": {
        "chebi_id": {
          "description": "ChEBI accession (e.g. CHEBI:15422).",
          "title": "Chebi Id",
          "type": "string"
        },
        "name": {
          "description": "Preferred ChEBI name.",
          "title": "Name",
          "type": "string"
        },
        "definition": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "ChEBI curated definition.",
          "title": "Definition"
        },
        "formula": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Molecular formula.",
          "title": "Formula"
        },
        "charge": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Net charge as string (e.g. -4).",
          "title": "Charge"
        },
        "inchi": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "InChI string.",
          "title": "Inchi"
        },
        "smiles": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "SMILES string.",
          "title": "Smiles"
        },
        "roles": {
          "description": "Ontology roles from ChEBI parents (e.g. metabolite, pharmaceutical).",
          "items": {
            "type": "string"
          },
          "title": "Roles",
          "type": "array"
        },
        "synonyms": {
          "description": "Known synonyms.",
          "items": {
            "type": "string"
          },
          "title": "Synonyms",
          "type": "array"
        },
        "cross_refs": {
          "$ref": "#/$defs/ChEBICrossRefsOut",
          "description": "Cross-references to PubChem, ChEMBL, UniProt."
        }
      },
      "required": [
        "chebi_id",
        "name"
      ],
      "title": "ChEBIEntry",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.chebi_compound``.",
  "properties": {
    "compounds": {
      "description": "Matching ChEBI compound entries.",
      "items": {
        "$ref": "#/$defs/ChEBIEntry"
      },
      "title": "Compounds",
      "type": "array"
    },
    "took_ms": {
      "description": "Wall-clock time for the upstream calls.",
      "title": "Took Ms",
      "type": "integer"
    }
  },
  "required": [
    "took_ms"
  ],
  "title": "ForgeChebiOut",
  "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/chebi_compound' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "identifiers": []
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.