Skip to main content
Glama

chronica_search

Search saved entries by content, tags, or type to retrieve past records from the Chronica memory server for context-aware conversations.

Instructions

保存されたエントリを検索します。本文・タグ・種別を含むエントリ一覧を返します。

【記憶の閲覧・一覧(save と対になる操作)】

  • 「記憶を見せて」「保存したものを一覧」「Chronicaに何が入ってる?」「最近の記録」では、 フィルタなしで呼び出す(引数は空オブジェクト {} または limit のみ)。 全スレッド横断で、保存日時の新しい順に最大100件が返る。

  • chronica_list_threads はスレッド名・件数・ID のみ。本文は含まれない。 本文を一覧・紹介するには必ず本ツール(search)を使う。特定スレッドだけなら thread_id を指定。

【使用タイミング】

  • ユーザーが「最近の〜を振り返りたい」と言ったとき

  • 特定のタグやトピックの記録を探すとき

【能動的な記憶参照】

  • ユーザーの発言に既存の記憶と関連しそうなテーマが出てきたら、 会話を止めずに裏側でsearchを呼ぶこと。

  • 関連記憶が見つかった場合、「Chronicaによると〜」等のメタ発言は不要。 その記憶を自然に会話に織り込む。

  • 例:ユーザーが仕事の悩みを話す → 過去の関連決定事項を検索 → 「以前〇〇と決めていましたよね」と自然につなげる。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idNoスレッドID(指定時はthread_typeより優先)
thread_typeNoスレッドタイプ
kindNoエントリ種別
tagsNoタグリスト(いずれか一致)
projectNoプロジェクト名
limitNo最大件数(省略時100)。一覧表示時も指定可。

Implementation Reference

  • The handler implementation for the 'chronica_search' tool, which validates input arguments and calls the store's search method.
    elif name == "chronica_search":
        thread_type = arguments.get("thread_type")
        if thread_type and 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)
            )]
        
        entries = store.search(
            thread_id=arguments.get("thread_id"),
            thread_type=thread_type,
            kind=arguments.get("kind"),
            tags=arguments.get("tags"),
            project=arguments.get("project"),
            limit=arguments.get("limit", 100)
        )
        return [types.TextContent(
            type="text",
            text=json.dumps({"entries": entries}, ensure_ascii=False, indent=2)
        )]
  • The registration and schema definition for the 'chronica_search' tool.
                types.Tool(
                    name="chronica_search",
                    description="""
    保存されたエントリを検索します。本文・タグ・種別を含むエントリ一覧を返します。
    
    【記憶の閲覧・一覧(save と対になる操作)】
    - 「記憶を見せて」「保存したものを一覧」「Chronicaに何が入ってる?」「最近の記録」では、
      フィルタなしで呼び出す(引数は空オブジェクト {} または limit のみ)。
      全スレッド横断で、保存日時の新しい順に最大100件が返る。
    - chronica_list_threads はスレッド名・件数・ID のみ。本文は含まれない。
      本文を一覧・紹介するには必ず本ツール(search)を使う。特定スレッドだけなら thread_id を指定。
    
    【使用タイミング】
    - ユーザーが「最近の〜を振り返りたい」と言ったとき
    - 特定のタグやトピックの記録を探すとき
    
    【能動的な記憶参照】
    - ユーザーの発言に既存の記憶と関連しそうなテーマが出てきたら、
      会話を止めずに裏側でsearchを呼ぶこと。
    - 関連記憶が見つかった場合、「Chronicaによると〜」等のメタ発言は不要。
      その記憶を自然に会話に織り込む。
    - 例:ユーザーが仕事の悩みを話す → 過去の関連決定事項を検索
      → 「以前〇〇と決めていましたよね」と自然につなげる。
    """,
                    inputSchema={
                        "type": "object",
                        "properties": {
                            "thread_id": {
                                "type": "string",
                                "description": "スレッドID(指定時はthread_typeより優先)"
                            },
                            "thread_type": {
                                "type": "string",
                                "enum": ["normal", "project"],
                                "description": "スレッドタイプ"
                            },
                            "kind": {
                                "type": "string",
                                "description": "エントリ種別"
                            },
                            "tags": {
                                "type": "array",
                                "items": {"type": "string"},
                                "description": "タグリスト(いずれか一致)"
                            },
                            "project": {
                                "type": "string",
                                "description": "プロジェクト名"
                            },
                            "limit": {
                                "type": "integer",
                                "description": "最大件数(省略時100)。一覧表示時も指定可。"
                            }
                        }
                    }
                ),
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, description carries full disclosure burden and successfully conveys: cross-thread scope (全スレッド横断), sort order (保存日時の新しい順), default limit (最大100件), parameter priority (thread_id > thread_type), and tag matching logic (いずれか一致). Minor gap: does not explicitly declare read-only safety or rate limits, though implied by 'search' context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Excellent structure with clear section markers (【記憶の閲覧・一覧】, 【使用タイミング】, 【能動的な記憶参照】). Front-loaded with core purpose. Uses specific examples (「記憶を見せて」「最近の記録」) without verbosity. Every sentence earns its place in guiding tool selection.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Comprehensive for a 6-parameter search tool with no output schema. Description compensates by explaining return structure (本文・タグ・種別を含むエントリ一覧). Covers sibling relationships and proactive usage patterns. Minor gap: does not specify pagination behavior beyond limit or error handling scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so baseline is 3. Description adds crucial behavioral semantics: thread_id takes priority over thread_type (指定時はthread_typeより優先), tags use OR logic (いずれか一致), limit defaults to 100 (省略時100), and empty object usage for unfiltered listing. Exceeds baseline significantly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description opens with specific verb-resource pair ('保存されたエントリを検索します') and explicitly distinguishes from sibling chronica_list_threads by noting that tool only returns thread metadata while this one returns full entry bodies (本文は含まれない...必ず本ツールを使う). Also contrasts with 'save' operation as the inverse action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names alternative tool chronica_list_threads for when only thread names are needed. Provides specific invocation patterns (empty object {} or limit only) for 'show memories' type queries. Includes dedicated sections for 【使用タイミング】 (when user wants to review recent items) and 【能動的な記憶参照】 (proactive background usage without meta-references).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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