Skip to main content
Glama

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
NameRequiredDescriptionDefault
viewNooverview

Implementation Reference

  • 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"
  • 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"
  • Registration block for `brain_stats` within the MCP server.
    def register(mcp):
        """Register stats tools with the MCP server."""
  • The registration of the `brain_stats` tool within the `register` function.
    def register(mcp):
        """Register stats tools with the MCP server."""

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mordechaipotash/brain-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server