brain_stats
Analyze cognitive data with stats for overview, domain distribution, thinking pulse, conversations, embeddings, GitHub activity, and document corpus.
Instructions
Brain overview, domain distribution, and thinking pulse.
Args:
view: What to display:
- "overview" (default): Stats across all data sources
- "domains": Domain breakdown with counts, %, breakthroughs, top concepts
- "pulse": Domain × thinking_stage matrix — what's crystallizing vs exploring
- "conversations": Detailed conversation stats
- "embeddings": Embedding coverage stats
- "github": Repository and commit stats
- "markdown": Document corpus stats
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | overview |
Implementation Reference
- brain_mcp/server/tools_stats.py:23-56 (handler)The main handler function for the `brain_stats` MCP tool.
@mcp.tool() def brain_stats(view: str = "overview") -> str: """ Brain overview, domain distribution, and thinking pulse. Args: view: What to display: - "overview" (default): Stats across all data sources - "domains": Domain breakdown with counts, %, breakthroughs, top concepts - "pulse": Domain × thinking_stage matrix — what's crystallizing vs exploring - "conversations": Detailed conversation stats - "embeddings": Embedding coverage stats - "github": Repository and commit stats - "markdown": Document corpus stats """ view = view.lower().strip() if view == "domains": return _domain_map_view() elif view == "pulse": return _thinking_pulse_view() elif view == "conversations": return _conversation_stats() elif view == "embeddings": return _embedding_stats() elif view == "github": return _github_stats() elif view == "markdown": return _markdown_stats() elif view == "overview": return _overview() else: return f"Unknown view: {view}. Use: overview, domains, pulse, conversations, embeddings, github, markdown" - brain_mcp/server/tools_stats.py:23-56 (handler)The `brain_stats` tool implementation in `brain_mcp/server/tools_stats.py`. It takes a `view` argument and dispatches to various internal helper functions to return statistics.
@mcp.tool() def brain_stats(view: str = "overview") -> str: """ Brain overview, domain distribution, and thinking pulse. Args: view: What to display: - "overview" (default): Stats across all data sources - "domains": Domain breakdown with counts, %, breakthroughs, top concepts - "pulse": Domain × thinking_stage matrix — what's crystallizing vs exploring - "conversations": Detailed conversation stats - "embeddings": Embedding coverage stats - "github": Repository and commit stats - "markdown": Document corpus stats """ view = view.lower().strip() if view == "domains": return _domain_map_view() elif view == "pulse": return _thinking_pulse_view() elif view == "conversations": return _conversation_stats() elif view == "embeddings": return _embedding_stats() elif view == "github": return _github_stats() elif view == "markdown": return _markdown_stats() elif view == "overview": return _overview() else: return f"Unknown view: {view}. Use: overview, domains, pulse, conversations, embeddings, github, markdown" - brain_mcp/server/tools_stats.py:20-21 (registration)Registration block for `brain_stats` within the MCP server.
def register(mcp): """Register stats tools with the MCP server.""" - brain_mcp/server/tools_stats.py:20-21 (registration)The registration of the `brain_stats` tool within the `register` function.
def register(mcp): """Register stats tools with the MCP server."""