Skip to main content
Glama

chatlog_search

Read-only

Search stored chat logs using FTS5 keywords, then narrow results by agent, model, provider, or time range. When the query is empty, it returns a filter-only listing of recent entries.

Instructions

Search chat_log rows. FTS5 keyword when query is non-empty; filter-only when empty.

Input Schema

NameRequiredDescriptionDefault
kNoMax results.
queryYesFTS5 query; empty → filter-only listing.
sinceNoISO-8601 lower bound on created_at.
storeNoNamed store for this call only: main, or a [stores.<name>] in m3_config.toml.
untilNoISO-8601 upper bound on created_at.
timeoutNoPer-call timeout in seconds; <=0 disables.
agent_idNoFilter by agent id.
databaseNoSQLite file for this call only (legacy; prefer store). SQLite backend only.
model_idNoFilter by model id.
providerNoFilter by provider.
host_agentNoFilter by host agent.
search_modeNoLexical (FTS5) only; vector modes are refused.keyword
conversation_idNoFilter by conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed30 schema fields changedv0.1.21
    • addedInput schema / properties / agent_id / description
      Added value: +"Filter by agent id."
    • removedInput schema / properties / agent_id / title
      Removed value: -"Agent Id"
    • addedInput schema / properties / conversation_id / description
      Added value: +"Filter by conversation."
    • removedInput schema / properties / conversation_id / title
      Removed value: -"Conversation Id"
    • removedInput schema / properties / database / default
      Removed value: -""
    • addedInput schema / properties / database / description
      Added value: +"SQLite file for this call only (legacy; prefer store). SQLite backend only."
    • removedInput schema / properties / database / title
      Removed value: -"Database"
    • addedInput schema / properties / host_agent / description
      Added value: +"Filter by host agent."
    • removedInput schema / properties / host_agent / title
      Removed value: -"Host Agent"
    • addedInput schema / properties / k / description
      Added value: +"Max results."
    • removedInput schema / properties / k / title
      Removed value: -"K"
    • addedInput schema / properties / model_id / description
      Added value: +"Filter by model id."
    • removedInput schema / properties / model_id / title
      Removed value: -"Model Id"
    • addedInput schema / properties / provider / description
      Added value: +"Filter by provider."
    • removedInput schema / properties / provider / title
      Removed value: -"Provider"
    • addedInput schema / properties / query / description
      Added value: +"FTS5 query; empty → filter-only listing."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • changedInput schema / properties / search_mode / default
      Previous value: -"hybrid"New value: +"keyword"
    • addedInput schema / properties / search_mode / description
      Added value: +"Lexical (FTS5) only; vector modes are refused."
    • addedInput schema / properties / search_mode / enum
      Added value: +[
      +  "keyword"
      +]
    • removedInput schema / properties / search_mode / title
      Removed value: -"Search Mode"
    • addedInput schema / properties / since / description
      Added value: +"ISO-8601 lower bound on created_at."
    • removedInput schema / properties / since / title
      Removed value: -"Since"
    • addedInput schema / properties / store
      Added value: +{
      +  "description": "Named store for this call only: main, or a [stores.<name>] in m3_config.toml.",
      +  "type": "string"
      +}
    • removedInput schema / properties / timeout / default
      Removed value: -30
    • addedInput schema / properties / timeout / description
      Added value: +"Per-call timeout in seconds; <=0 disables."
    • removedInput schema / properties / timeout / title
      Removed value: -"Timeout"
    • addedInput schema / properties / until / description
      Added value: +"ISO-8601 upper bound on created_at."
    • removedInput schema / properties / until / title
      Removed value: -"Until"
    • removedInput schema / title
      Removed value: -"chatlog_searchArguments"
  2. Addedv0.1.9
  3. Removedv0.1.6
  4. Changed1 schema field changedv0.1.2
    • addedInput schema / properties / timeout
      Added value: +{
      +  "default": 30,
      +  "title": "Timeout",
      +  "type": "number"
      +}
  5. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds the meaningful FTS5-vs-filter-only branching, but says nothing about result limits (default k=8), ranking, timeout behavior, or which store is consulted by default.

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?

Two short sentences, zero filler, and the mode-switching rule is front-loaded. Nothing needs to be trimmed.

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

Completeness3/5

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

For a 13-parameter tool with no output schema and many filter combinations, the description is thin: it never says how filters interact with a non-empty query (AND vs. ignored), what a result row looks like, or how ordering works. It is sufficient to fire a call but not to predict its output.

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

Parameters3/5

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

Schema coverage is 100%, so every parameter including search_mode and store already carries its own description. The description reinforces query semantics but adds no format or interaction detail beyond the schema; baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource ("Search chat_log rows") and clarifies the two operating modes. It does not distinguish itself from siblings like memory_search, so an agent can't tell from this text alone which search surface to pick.

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

Usage Guidelines3/5

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

The empty-vs-non-empty query rule implies when each mode fires, but there is no explicit guidance on when to call this versus memory_search or memory_get, and no prerequisites or exclusions are stated.

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