Skip to main content
Glama

dormant_contexts

Identify unresolved domains and open questions from conversation history to address forgotten topics and incomplete discussions.

Instructions

Find abandoned tunnels β€” domains with open questions you haven't resolved. The 'what have I forgotten?' alarm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
min_importanceNosignificant
limitNo

Implementation Reference

  • The handler function `dormant_contexts` implements the logic for identifying domains with unresolved open questions, providing both a high-level summary view and a raw conversation fallback.
    @mcp.tool()
    def dormant_contexts(min_importance: str = "significant", limit: int = 20) -> str:
        """
        Find abandoned tunnels β€” domains with open questions you haven't resolved.
        The 'what have I forgotten?' alarm.
        """
        db = get_summaries_db()
        if db:
            rows = db.execute("""
                SELECT domain_primary, COUNT(*) as conv_count,
                       GROUP_CONCAT(open_questions, '|||') as all_oq,
                       GROUP_CONCAT(importance, ',') as importances,
                       MAX(thinking_stage) as latest_stage
                FROM summaries
                WHERE domain_primary != '' AND domain_primary IS NOT NULL
                GROUP BY domain_primary
                ORDER BY conv_count DESC
            """).fetchall()
    
            if not rows:
                return "No domain data found."
    
            importance_rank = {"breakthrough": 3, "significant": 2, "routine": 1}
            min_rank = importance_rank.get(min_importance, 1)
    
            results = []
            for domain, count, all_oq_str, importances_str, stage in rows:
                imps = (importances_str or "").split(",")
                max_imp = max(importance_rank.get(i.strip(), 0) for i in imps if i.strip())
                if max_imp < min_rank:
                    continue
                questions = []
                for chunk in (all_oq_str or "").split("|||"):
                    for q in parse_json_field(chunk):
                        if q and q.lower() != "none identified" and q not in questions:
                            questions.append(q)
                if not questions:
                    continue
                bt_count = sum(1 for i in imps if i.strip() == "breakthrough")
                results.append((domain, count, questions, stage, bt_count))
    
            results.sort(key=lambda x: (-x[4], -len(x[2]), -x[1]))
    
            output = [f"## πŸ”΄ Dormant Contexts (importance >= {min_importance})\n"]
            output.append(f"_Domains with unresolved open questions_\n")
    
            for domain, count, questions, stage, bt in results[:limit]:
                bt_marker = " πŸ’Ž" if bt else ""
                output.append(f"### {domain}{bt_marker}")
                output.append(f"_{count} conversations | Stage: {stage or 'unknown'}_")
                output.append(f"**{len(questions)} open questions:**")
                for q in questions[:5]:
                    output.append(f"  ❓ {q}")
                if len(questions) > 5:
                    output.append(f"  _... and {len(questions)-5} more_")
                output.append("")
    
            output.append(f"_Total: {len(results)} domains with open questions_")
            return "\n".join(output)
  • Registration entry for the `dormant_contexts` tool within the dashboard tools registry.
        "name": "dormant_contexts",
        "description": "Find abandoned tunnels / dormant domains",
        "category": "Cognitive Prosthetic",
        "requires": ["summaries"],
        "params": {"min_importance": "float=0", "limit": "int=5"},
        "probe": {},
    },

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