chore: housekeeping
This commit is contained in:
1 parent
4ea8f861cc
commit
0c2fc96ff8
29 files changed
+13
-1232
No files matched your search
@@ -977,8 +977,8 @@ impl McpTool for GetSubgraphHandler {
|
||||
|
||||
async fn execute(&self, args: Value, state: Arc<MemoryState>) -> crate::error::Result<String> {
|
||||
let req: GetSubgraphTool = serde_json::from_value(args).map_err(|e| e.to_string())?;
|
||||
let root = req.root_entity.or(req.root_node).ok_or_else(|| {
|
||||
crate::error::AppError::Internal("root_entity or root_node is required".to_string())
|
||||
let root = req.root_entity.ok_or_else(|| {
|
||||
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);
|
||||
@@ -1043,7 +1043,7 @@ impl McpTool for GetSubgraphHandler {
|
||||
}
|
||||
|
||||
let result = serde_json::json!({
|
||||
"root_node": root,
|
||||
"root_entity": root,
|
||||
"depth": depth,
|
||||
"entities": matched_entities,
|
||||
"relations": matched_relations,
|
||||
|
||||
Reference in new issue
Block a user