fix(graph): improve LLM tool UX for GetSubgraphTool and ReadGraphTool
This commit is contained in:
1 parent
eed9a9165c
commit
39528411f4
2 files changed
+5
-2
No files matched your search
@@ -625,6 +625,7 @@ impl McpTool for ReadGraphHandler {
|
||||
.entities
|
||||
.iter()
|
||||
.filter(|(_, v)| req.namespace.as_ref().is_none_or(|ns| &v.namespace == ns))
|
||||
.filter(|(_, v)| req.entity_type.as_ref().is_none_or(|et| &v.entity_type == et))
|
||||
.collect();
|
||||
|
||||
let total_count = filtered_entities.len();
|
||||
@@ -1120,7 +1121,7 @@ impl McpTool for GetSubgraphHandler {
|
||||
crate::error::AppError::Internal("root_entity is required".to_string())
|
||||
})?;
|
||||
let depth = req.depth.unwrap_or(2);
|
||||
let format = req.format.unwrap_or(SubgraphFormat::Json);
|
||||
let format = req.format.unwrap_or(SubgraphFormat::MarkdownTree);
|
||||
|
||||
let (matched_entities, matched_relations) = state.read_graph(|full| {
|
||||
let mut adj: std::collections::HashMap<&str, Vec<&str>> =
|
||||
|
||||
Reference in new issue
Block a user