Run the MCP server with stdio transport.
()
| 601 | |
| 602 | module_tree = json.loads(module_tree_path.read_text(encoding="utf-8")) |
| 603 | |
| 604 | def _summarize_tree(tree, depth=0): |
| 605 | lines = [] |
| 606 | for name, info in tree.items(): |
| 607 | indent = " " * depth |
| 608 | comp_count = len(info.get("components", [])) |
| 609 | children = info.get("children", {}) |
| 610 | child_count = len(children) if isinstance(children, dict) else 0 |
| 611 | lines.append(f"{indent}- {name} ({comp_count} components, {child_count} children)") |
| 612 | if isinstance(children, dict) and children: |
| 613 | lines.extend(_summarize_tree(children, depth + 1)) |