Skip to main content
Glama

search_sessions

Search saved AI conversation records by keyword across file names and content, with optional filtering by IDE or date for targeted retrieval.

Instructions

【搜索会话】当用户说"搜索包含 XX 的会话"、"查找关于 XX 的对话"、"找一下 XX 相关记录"、"哪些会话提到了 XX"等时调用。在会话文件名和内容中搜索关键词,不区分大小写。触发词:搜索、查找、找、包含、相关会话/对话/记录

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_dirNo会话保存的基础目录路径(可选,优先级最高。未指定时依次使用: 环境变量MCP_SESSION_BASE_DIR > config.json配置 > 默认路径)
keywordYes要搜索的关键词(不区分大小写,会在文件名和内容中匹配)
ide_nameNoIDE名称(可选,用于缩小搜索范围到特定IDE)
date_filterNo日期过滤(可选,格式: YYYY-MM-DD,用于在特定日期的会话中搜索)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the search is case-insensitive and covers filenames and content, which is useful. However, it lacks details on output format (e.g., what results look like), error handling, or performance aspects (e.g., search speed, limitations). This leaves gaps for an agent to understand the full behavior.

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

Conciseness4/5

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

The description is front-loaded with clear purpose and usage examples, followed by behavioral details. It avoids redundancy, but the inclusion of trigger phrases in Chinese might be slightly verbose for non-Chinese contexts. Overall, it's efficient with most sentences adding value.

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?

Given no annotations and no output schema, the description is moderately complete. It covers purpose, usage, and some behavior, but lacks output details (e.g., result format) and deeper behavioral context (e.g., error cases). For a search tool with 4 parameters, this is adequate but has clear gaps in guiding an agent on what to expect from the tool's operation.

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 description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, only reiterating that keyword searches are case-insensitive and cover filenames and content, which is already implied in the schema's keyword description. Baseline 3 is appropriate as the schema does the heavy lifting.

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?

The description clearly states the tool's purpose: searching for keywords in session files and content, case-insensitively. It specifies both the resource (sessions) and the action (searching in filenames and content), distinguishing it from sibling tools like list_sessions or read_session by focusing on keyword-based retrieval rather than listing or reading specific sessions.

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?

The description provides explicit usage guidelines, including trigger phrases (e.g., '搜索包含 XX 的会话', '查找关于 XX 的对话') and when to call the tool. It implicitly distinguishes from siblings by focusing on keyword searches, unlike delete_session (deletion), list_sessions (listing without search), read_session (reading specific sessions), or save_session (saving).

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/oscar-wang-xin/mcp-session-saver'

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