Skip to main content
Glama
kegg-mcp-server

kegg-mcp-server

by Lucas-Servi

get_pathway_genes

Read-onlyIdempotent

Retrieve all genes associated with a KEGG pathway by specifying an organism-specific pathway ID, with an optional limit on results.

Instructions

Get all genes associated with a KEGG pathway.

Args: pathway_id: KEGG pathway ID (e.g. 'hsa00010'). Use organism-specific IDs (e.g. 'pae00350' for P. aeruginosa) — reference pathways ('map*') are not supported by the KEGG gene link API. max_results: Maximum number of pairs to return (capped at 100).

Input Schema

NameRequiredDescriptionDefault
pathway_idYes
max_resultsNo

Output Schema

NameRequiredDescriptionDefault
countYes
pairsYes
linked_dbYes
truncatedNo
pathway_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.5.0
    • addedInput schema / properties / max_results
      Added value: +{
      +  "default": 100,
      +  "title": "Max Results",
      +  "type": "integer"
      +}
    • removedOutput schema / $defs
      Removed value: -{
      -  "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"
      -  },
      -  "PathwayLinks": {
      -    "properties": {
      -      "count": {
      -        "title": "Count",
      -        "type": "integer"
      -      },
      -      "linked_db": {
      -        "title": "Linked Db",
      -        "type": "string"
      -      },
      -      "pairs": {
      -        "items": {
      -          "maxItems": 2,
      -          "minItems": 2,
      -          "prefixItems": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "string"
      -            }
      -          ],
      -          "type": "array"
      -        },
      -        "title": "Pairs",
      -        "type": "array"
      -      },
      -      "pathway_id": {
      -        "title": "Pathway Id",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "pathway_id",
      -      "linked_db",
      -      "pairs",
      -      "count"
      -    ],
      -    "title": "PathwayLinks",
      -    "type": "object"
      -  }
      -}
    • addedOutput schema / properties / count
      Added value: +{
      +  "title": "Count",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / linked_db
      Added value: +{
      +  "title": "Linked Db",
      +  "type": "string"
      +}
    • addedOutput schema / properties / pairs
      Added value: +{
      +  "items": {
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "prefixItems": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "string"
      +      }
      +    ],
      +    "type": "array"
      +  },
      +  "title": "Pairs",
      +  "type": "array"
      +}
    • addedOutput schema / properties / pathway_id
      Added value: +{
      +  "title": "Pathway Id",
      +  "type": "string"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "$ref": "#/$defs/PathwayLinks"
      -    },
      -    {
      -      "$ref": "#/$defs/ErrorResult"
      -    }
      -  ],
      -  "title": "Result"
      -}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "default": false,
      +  "title": "Truncated",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "pathway_id",
      +  "linked_db",
      +  "pairs",
      +  "count"
      +]
    • changedOutput schema / title
      Previous value: -"get_pathway_genesOutput"New value: +"PathwayLinks"
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly=true, idempotent=true, openWorld=true, and non-destructive. The description adds useful behavioral context beyond annotations: the KEGG gene link API does not support reference pathways, and max_results is capped at 100. It does not describe pagination or return shape, but an output schema exists.

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 description is short and front-loaded with the purpose, then structured into an Args block. Every line is relevant, though the phrase is slightly formal rather than conversational.

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?

Given the simple two-parameter schema, existing output schema, and rich annotations, the description supplies the key context an agent needs: correct ID format and unsupported reference pathways. It stops short of explaining what happens when max_results truncates results, but that is a minor omission.

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?

Schema description coverage is 0%, so the description must carry parameter meaning. It does well: pathway_id is explained with examples ('hsa00010', 'pae00350') and a critical restriction about reference pathways, while max_results is explained as a cap of 100. Minor gaps remain around default behavior and whether max_results truncates silently.

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 states a specific verb and resource: 'Get all genes associated with a KEGG pathway.' It is clearly distinguishable from siblings like get_pathway_info, get_pathway_compounds, and get_pathway_reactions, which return different entity types for a pathway.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a concrete usage constraint: organism-specific IDs are required and reference 'map*' pathways are not supported. It does not explicitly compare against search_genes or get_gene_info, but the tool's niche is clear from the purpose statement.

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