Skip to content

fix: include outgoing relations in open_nodes#3332

Open
Limitless2023 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Limitless2023:fix/memory-open-nodes-outgoing-relations
Open

fix: include outgoing relations in open_nodes#3332
Limitless2023 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Limitless2023:fix/memory-open-nodes-outgoing-relations

Conversation

@Limitless2023
Copy link

Summary

Fix for issue #3137 - open_nodes returns empty relations array even when entities have outgoing relations.

Changes

  • Modified openNodes to return outgoing relations (where the entity is the from endpoint) in addition to relations between opened nodes
  • Updated tool description to reflect new behavior
  • Updated tests to match new expected behavior

Why

Previously, open_nodes only returned relations where both endpoints were in the requested node list. This made it impossible to traverse the graph from specific nodes without reading the entire graph.

Now, when you open a node, you also get its outgoing relations, enabling graph traversal.

Test

All tests pass (42/42)

When opening nodes in the knowledge graph, return outgoing
relations (where the entity is the 'from' endpoint) in addition
to relations between opened nodes. This allows traversing
the graph from specific nodes without needing to read the
entire graph.

Fixes modelcontextprotocol#3137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants