Skip to main content
Glama
kegg-mcp-server

kegg-mcp-server

by Lucas-Servi

get_pathway_compounds

Read-onlyIdempotent

Retrieve compounds or metabolites linked to a specified KEGG pathway ID, with an optional result limit. Use it to map pathway metabolites for enrichment, annotation, or network analysis.

Instructions

Get all compounds (metabolites) associated with a KEGG pathway.

Args: pathway_id: KEGG pathway ID (e.g. 'map00010'). 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_compoundsOutput"New value: +"PathwayLinks"
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, open-world, and non-destructive behavior. The description adds useful behavioral context by stating that results are capped at 100 via max_results, though it does not elaborate on truncation or ordering.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and then briefly documents the two arguments. There is no wasted text, and the example pathway ID is directly useful.

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?

For a simple retrieval tool with an output schema and comprehensive annotations, the description is nearly complete. The main remaining gap is that it does not explain how results behave when the pathway has more than 100 compounds.

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 carries the burden and does document both parameters: pathway_id with a KEGG example and max_results with its 100-item cap. It adds meaningful semantics beyond the bare schema, though it could clarify the meaning of 'pairs' and valid max_results bounds.

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 uses a specific verb and resource: 'Get all compounds (metabolites) associated with a KEGG pathway.' This clearly distinguishes it from pathway siblings such as get_pathway_genes, get_pathway_reactions, and get_pathway_info.

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

Usage Guidelines3/5

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

The pathway association implies when to use it, but the description does not explicitly state when to choose this over alternatives like search_compounds or get_compound_info. There is clear contextual scoping, but no explicit usage guidance or exclusions.

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