MCPcopy Create free account
hub / github.com/FastLED/FastLED / project_info

Function project_info

mcp_server.py:1570–1619  ·  view source on GitHub ↗

Get project information.

(arguments: dict[str, Any], project_root: Path)

Source from the content-addressed store, hash-verified

1568
1569
1570async def project_info(arguments: dict[str, Any], project_root: Path) -> CallToolResult:
1571 """Get project information."""
1572 include_git = arguments.get("include_git_status", True)
1573
1574 info: list[str] = []
1575
1576 # Basic project info
1577 info.append("FastLED Project Information")
1578 info.append("=" * 30)
1579
1580 # Check if key files exist
1581 key_files = [
1582 "library.json",
1583 "library.properties",
1584 "platformio.ini",
1585 "pyproject.toml",
1586 ]
1587 for file in key_files:
1588 file_path = project_root / file
1589 status = "✓" if file_path.exists() else "✗"
1590 info.append(f"{status} {file}")
1591
1592 # Count examples
1593 examples_dir = project_root / "examples"
1594 if examples_dir.exists():
1595 example_count = len(
1596 [
1597 d
1598 for d in examples_dir.iterdir()
1599 if d.is_dir() and not d.name.startswith(".")
1600 ]
1601 )
1602 info.append(f"📁 {example_count} examples available")
1603
1604 # Git status
1605 if include_git:
1606 try:
1607 git_result = await run_command(
1608 ["git", "status", "--porcelain"], project_root
1609 )
1610 if git_result.strip():
1611 info.append(
1612 f"\n🔄 Git status: {len(git_result.strip().split())} files modified"
1613 )
1614 else:
1615 info.append("\n[OK] Git status: Working tree clean")
1616 except Exception:
1617 info.append("\n❓ Git status: Unable to determine")
1618
1619 return CallToolResult(content=[TextContent(type="text", text="\n".join(info))])
1620
1621
1622async def run_specific_command(

Callers 1

call_toolFunction · 0.85

Calls 3

run_commandFunction · 0.70
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected