Skip to main content
Glama

Fetch Related Entities

fetch_related
Read-only

Get related entities for a list of known entities. Use when you HAVE specific entities and want their connected entities.

Examples: "What drugs does Pfizer have?", "What targets does pembrolizumab hit?", "Which companies are developing ADCs?", "Which companies/mechanisms/indications are linked to adagrasib?", "What indications/targets does NCT12345678 cover?"

Accepts up to 25 input entities. Results are grouped by input entity. Unresolved entities are reported separately in the unresolved array. In a mixed batch, inputs whose type cannot traverse to related_type are skipped and reported in a top-level errors array while the valid inputs are still processed; the call only errors outright when no input can traverse.

Supports modality as an input type for modality-based queries (e.g., ADC -> companies). This is an input-only type and cannot be used as related_type.

For DISCOVERING entities by criteria or attributes, use search_entities instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entities": "<entities>",
      "related_type": "<related_type>"
    },
    "name": "fetch_related"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (1-indexed).
fieldsNoOptional list of field names to include on each related record. Must be display columns of `related_type`; an unknown name returns an error listing the valid ones. Defaults to the standard display columns if omitted.
entitiesYesList of entities to find relations for. Each dict has 'name' (str) and 'type' (company|drug|trial|mechanism|target|indication|modality). Max 25 entities.
page_sizeNoResults per entity per page (max 25).
related_typeYesType of related entity to retrieve.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/non-destructive; the description adds substantial behavior beyond that: a 25-entity batch cap, grouping by input entity, a separate `unresolved` array, and precise partial-failure semantics (skipped inputs land in a top-level `errors` array while valid inputs still process, with an outright error only when nothing can traverse). It also discloses a non-obvious type constraint — modality works as an input type but cannot be a `related_type`.

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?

Core routing statement and the search_entities exclusion are front-loaded and earn their place. The four examples each encode a different usage shape (modality input, trial input, company discovery phrasing), but collectively they take up roughly half the text and one or two would likely suffice.

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?

For a batch traversal tool with five parameters, an output schema, and full annotation coverage, the description supplies everything an agent needs to decide, batch, and interpret partial failures. Return shape is left to the output schema, which is correct.

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 coverage is 100%, so the baseline would be 3, but the description adds real meaning beyond the schema: it explains why `modality` is absent from the `related_type` enum (input-only type), and it clarifies the batch/grouping semantics of the `entities` array and the per-entity nature of `page_size`. It does not explain `fields` or `page` beyond what the schema already documents.

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 first sentence names a specific verb and resource ("Get related entities for a list of known entities"), and the second sentence plus the closing line explicitly position it against search_entities. An agent can tell this is the traversal/lookup tool rather than the discovery tool without opening either schema.

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?

It states the selecting condition directly ("Use when you HAVE specific entities and want their connected entities") and names the alternative with the opposite condition ("For DISCOVERING entities by criteria or attributes, use search_entities instead"). The worked examples cover multiple entity-type entry points, so the when-to-use decision is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources