Skip to main content
Glama

chronica_summarize

Generate structured summaries from memory data using time ranges and thread types to organize information for review.

Instructions

サマリーパックを生成します(Summary Pack v0.1.2)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesモード
range_startYes範囲開始時刻(ISO文字列、JST)
range_endYes範囲終了時刻(ISO文字列、JST)
thread_typeYesスレッドタイプ

Implementation Reference

  • The handler logic for 'chronica_summarize' which validates arguments and calls the 'summarize' helper.
    elif name == "chronica_summarize":
        mode = arguments.get("mode")
        range_start = arguments.get("range_start")
        range_end = arguments.get("range_end")
        thread_type = arguments.get("thread_type")
        
        if not all([mode, range_start, range_end, thread_type]):
            return [types.TextContent(
                type="text",
                text=json.dumps({"error": "invalid_range", "message": "mode, range_start, range_end, and thread_type are required"}, ensure_ascii=False)
            )]
        
        if mode not in ["daily", "weekly", "decision"]:
            return [types.TextContent(
                type="text",
                text=json.dumps({"error": "invalid_range", "message": f"mode must be 'daily', 'weekly', or 'decision', got: {mode}"}, ensure_ascii=False)
            )]
        
        if thread_type not in ["normal", "project"]:
            return [types.TextContent(
                type="text",
                text=json.dumps({"error": "invalid_thread", "message": f"thread_type must be 'normal' or 'project', got: {thread_type}"}, ensure_ascii=False)
            )]
        
        summary_pack = summarize(
            mode=mode,
            range_start=range_start,
            range_end=range_end,
            thread_type=thread_type,
            store=store
        )
        return [types.TextContent(
            type="text",
            text=json.dumps(summary_pack, ensure_ascii=False, indent=2)
  • MCP tool definition and input schema for 'chronica_summarize'.
    types.Tool(
        name="chronica_summarize",
        description="サマリーパックを生成します(Summary Pack v0.1.2)。",
        inputSchema={
            "type": "object",
            "properties": {
                "mode": {
                    "type": "string",
                    "enum": ["daily", "weekly", "decision"],
                    "description": "モード"
                },
                "range_start": {
                    "type": "string",
                    "description": "範囲開始時刻(ISO文字列、JST)"
                },
                "range_end": {
                    "type": "string",
                    "description": "範囲終了時刻(ISO文字列、JST)"
                },
                "thread_type": {
                    "type": "string",
                    "enum": ["normal", "project"],
                    "description": "スレッドタイプ"
  • The actual implementation logic for 'summarize'.
    def summarize(
        mode: str,
        range_start: str,
        range_end: str,
        thread_type: str,
        store: Store
    ) -> Dict[str, Any]:
        """サマリーパックを生成"""
        entries = store.timeline(
            start_time=range_start,
            end_time=range_end,
            thread_type=thread_type
        )
        
        stats = {
            "total_entries": len(entries),
            "by_kind": {}
        }
        for entry in entries:
            kind = entry.get("kind", "unknown")
            stats["by_kind"][kind] = stats["by_kind"].get(kind, 0) + 1
        
        timeline_items = []
        for entry in entries:
            item = {
                "entry_id": entry["entry_id"],
                "saved_time": entry["saved_time"],
                "kind": entry["kind"],
                "title": entry.get("title"),
                "text": entry.get("text", "")[:200]
            }
            if "event_time" in entry:
                item["event_time"] = entry["event_time"]

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/Nic9dev/Chronica'

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