Skip to content

Commit d991763

Browse files
wip
1 parent 17465c8 commit d991763

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

mcp_server/src/mcp_server_neo4j_gds/community_algorithm_handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ class KCoreDecompositionHandler(AlgorithmHandler):
5858
def k_core_decomposition(self, **kwargs):
5959
with projected_graph(self.gds, undirected=True) as G:
6060
logger.info("Running K-Core Decomposition")
61-
kcore_decomposition_result = self.gds.kcore.stream(G)
61+
k_core_decomposition_result = self.gds.kcore.stream(G)
6262

6363
# Add node names to the results if nodeIdentifierProperty is provided
6464
node_identifier_property = kwargs.get("nodeIdentifierProperty")
6565
translate_ids_to_identifiers(
66-
self.gds, node_identifier_property, kcore_decomposition_result
66+
self.gds, node_identifier_property, k_core_decomposition_result
6767
)
6868

6969
def execute(self, arguments: Dict[str, Any]) -> Any:

mcp_server/src/mcp_server_neo4j_gds/node_translator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def translate_ids_to_identifiers(
5959
for node_id in results[id_name]
6060
]
6161
results[node_identifier_output_name] = node_name_values
62+
assert 1 == results[node_identifier_output_name].nunique()
6263

6364

6465
def filter_identifiers(

0 commit comments

Comments
 (0)