Skip to main content
Glama

get_inbound_relations

Retrieve inbound Wikidata relations to identify alliance members, conflict participants, basin countries, or corporate owners, with total counts and truncation flags.

Instructions

Retrieve inbound relations for target entities (e.g. alliance members via P463, conflict participants via P710, basin countries via P205, corporate owners via P127). Includes accurate total counts and truncation flags.

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": {
      "target_qids": "<target_qids>"
    },
    "name": "get_inbound_relations"
  }
}

Input Schema

NameRequiredDescriptionDefault
predicatesNoInbound predicate IDs (e.g. ['P463', 'P710', 'P205', 'P17']). Defaults to ['P463', 'P710', 'P205', 'P17', 'P749', 'P127', 'P355'].
target_qidsYesTarget entity QIDs (e.g. ['Q7184'] for NATO, ['Q110999040'] for Russo-Ukrainian War).
subject_domainNoConstrain inbound subjects to a domain (e.g. 'country' to only list member countries).
limit_per_relationNoMaximum subjects to return per relation (default: 50).
subject_class_qidsNoConstrain inbound subjects to specific class QIDs.
filter_subject_qidsNoFilter inbound subjects to check membership only within a specific candidate set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses that results include accurate total counts and truncation flags, which tells the agent how to detect incomplete results, but it says nothing about permissions, cost, or that this is a non-mutating read.

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?

Two compact sentences with the core action front-loaded and the output-shape note second. The parenthetical predicate list is long but earns its place by making the relation semantics concrete.

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 six-parameter read tool with full schema coverage and no output schema, the description covers the core purpose and the truncation/count behavior an agent needs to interpret results. Only the read-only nature and relation direction relative to sibling tools are left implicit.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter including predicates, subject_domain, and filter_subject_qids is already documented. The description's predicate examples restate what the schema already lists, adding no new meaning beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The verb 'Retrieve' pairs with a specific resource, 'inbound relations for target entities', and concrete examples (alliance members via P463, conflict participants via P710) make the direction of the relation unambiguous. It does not explicitly separate itself from the closest sibling, get_entity_triples, so it stops short of a 5.

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 predicate examples imply the intended use case (finding members/participants/owners of an entity) but there is no explicit statement of when to pick this over get_entity_triples or query_sparql. Usage is inferable rather than stated.

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