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
| Name | Required | Description | Default |
|---|---|---|---|
| min_importance | No | significant | |
| limit | No |
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) - brain_mcp/dashboard/routes/tools.py:37-43 (registration)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": {}, },