Skip to main content
Glama
kegg-mcp-server

kegg-mcp-server

by Lucas-Servi

convert_identifiers

Read-onlyIdempotent

Convert KEGG gene or chemistry IDs to and from external database identifiers (NCBI Gene/Protein, UniProt, PubChem, ChEBI) for cross-database mapping.

Instructions

Convert KEGG IDs to/from external database identifiers.

Converts within one kind only, KEGG side <-> outside side: genes (organism code 'hsa' or T-number 'T01001') <-> ncbi-geneid / ncbi-proteinid / uniprot; chemistry (compound / drug / glycan) <-> pubchem / chebi. Cross-kind pairs such as compound<->uniprot are rejected by KEGG, and 'kegg' is not a database conv accepts.

Args: source_db: Source database — 'hsa', 'T01001', 'ncbi-geneid', 'ncbi-proteinid', 'uniprot', 'compound', 'drug', 'glycan', 'pubchem' or 'chebi'. target_db: Target database, from the same list and the opposite side of the pair (e.g. source_db='hsa' + target_db='uniprot', or source_db='chebi' + target_db='compound'). entry_ids: Optional list of specific IDs to convert. Bare ids are prefixed with source_db automatically ('1956' -> 'hsa:1956'). KEGG accepts at most 10 per request; longer lists are chunked and fetched concurrently rather than silently dropped. If None, converts the full source database (large: hsa <-> ncbi-geneid is ~700 KB).

Input Schema

NameRequiredDescriptionDefault
entry_idsNo
source_dbYes
target_dbYes

Output Schema

NameRequiredDescriptionDefault
countYes
mappingsYes
source_dbYes
target_dbYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.5.0
    • removedOutput schema / $defs
      Removed value: -{
      -  "ConversionResult": {
      -    "properties": {
      -      "count": {
      -        "title": "Count",
      -        "type": "integer"
      -      },
      -      "mappings": {
      -        "additionalProperties": {
      -          "type": "string"
      -        },
      -        "title": "Mappings",
      -        "type": "object"
      -      },
      -      "source_db": {
      -        "title": "Source Db",
      -        "type": "string"
      -      },
      -      "target_db": {
      -        "title": "Target Db",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "source_db",
      -      "target_db",
      -      "mappings",
      -      "count"
      -    ],
      -    "title": "ConversionResult",
      -    "type": "object"
      -  },
      -  "ErrorResult": {
      -    "description": "Structured error returned by a tool when the KEGG API fails.\n\nA tool returns this instead of raising so the model can reason about\nthe failure and decide whether to retry, change inputs, or give up.\nA point lookup that receives a 404 uses code ``not_found``; an empty search\nremains a successful result with no items.",
      -    "properties": {
      -      "code": {
      -        "default": "kegg_api_error",
      -        "title": "Code",
      -        "type": "string"
      -      },
      -      "error": {
      -        "title": "Error",
      -        "type": "string"
      -      },
      -      "hint": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Hint"
      -      },
      -      "path": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Path"
      -      },
      -      "retryable": {
      -        "default": false,
      -        "title": "Retryable",
      -        "type": "boolean"
      -      },
      -      "status": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Status"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "title": "ErrorResult",
      -    "type": "object"
      -  }
      -}
    • addedOutput schema / properties / count
      Added value: +{
      +  "title": "Count",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / mappings
      Added value: +{
      +  "additionalProperties": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "title": "Mappings",
      +  "type": "object"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "$ref": "#/$defs/ConversionResult"
      -    },
      -    {
      -      "$ref": "#/$defs/ErrorResult"
      -    }
      -  ],
      -  "title": "Result"
      -}
    • addedOutput schema / properties / source_db
      Added value: +{
      +  "title": "Source Db",
      +  "type": "string"
      +}
    • addedOutput schema / properties / target_db
      Added value: +{
      +  "title": "Target Db",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "source_db",
      +  "target_db",
      +  "mappings",
      +  "count"
      +]
    • changedOutput schema / title
      Previous value: -"convert_identifiersOutput"New value: +"ConversionResult"
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent annotations by disclosing request limits (KEGG caps at 10 IDs), that longer lists are chunked and fetched concurrently rather than dropped, that bare IDs are auto-prefixed, and that full-database conversion is very large (~700 KB). Those are exactly the operational traits an agent needs before calling.

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?

Front-loaded with the one-sentence purpose, then constraints, then per-argument detail; every section is useful given the empty schema. Slight redundancy in restating 'from the same list and the opposite side of the pair' after already showing examples keeps it from a 5.

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

Completeness5/5

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

An output schema exists, so return values need not be explained, and everything an agent must know before invoking — valid values, pairing rules, chunking, payload size — is present. Nothing material is missing for a 3-parameter tool.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden — and it does: it enumerates all valid source_db/target_db values, explains the opposite-side pairing requirement, documents entry_ids as optional with a default, and shows the auto-prefix transformation ('1956' -> 'hsa:1956'). No ambiguity remains.

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 ('Convert KEGG IDs to/from external database identifiers') and immediately scopes it to one kind only, distinguishing it from every lookup/search sibling. The gene vs chemistry split is explicit, so an agent knows exactly what class of job this tool handles.

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?

Gives concrete when-to-use routing (source_db='hsa' + target_db='uniprot', chebi<->compound) plus explicit exclusions: cross-kind pairs like compound<->uniprot are rejected, and 'kegg' is not an accepted database. Also tells the agent when to omit entry_ids versus supply them.

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