GraphForge.AI

get_entity_relations

获取实体的关系网络(上下游关系)。

适用于:分析供应链结构、了解供应商/客户关系、发现合作伙伴。

输入 Schema

字段类型必填说明
input?

用途

取实体的关系网络:谁指向我 + 我指向谁。可按 direction(in/out/both)和 relation_type 过滤。

调用示例

Claude Desktop 中说:"准交率指标依赖哪些上游?"

JSON-RPC payload:

{
  "method": "tools/call",
  "params": {
    "name": "get_entity_relations",
    "arguments": {
      "input": "准交率"
    }
  }
}

返回示例

{
  "entity": "准交率",
  "relations": [
    { "direction": "out", "type": "依赖", "target": "按时交付订单数" },
    { "direction": "out", "type": "依赖", "target": "总订单数" },
    { "direction": "in",  "type": "应用于", "source": "供应链效率评估" }
  ]
}

何时用

  • 想看一个实体的"邻居" 1 跳关系
  • 准备做依赖分析(先 get_entity_relations 找上下游,再对每个上游再调)
  • 用户问"谁会受 X 影响"或"X 依赖什么"

注意

只返直接 1 跳关系;多跳穿透请用 get_metric_lineage(指标)或 analyze_root_cause(深度推理)。

返回的 source/target 字段方向跟 direction 对应。