Skip to main content
Glama

search_sessions

Search for sessions by keyword in file names and content. Filter results by IDE or date.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes要搜索的关键词(不区分大小写,会在文件名和内容中匹配)
base_dirNo会话保存的基础目录路径(可选,优先级最高。未指定时依次使用: 环境变量MCP_SESSION_BASE_DIR > config.json配置 > 默认路径)
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, the description carries full weight. It discloses case-insensitive search across both filename and content, but lacks details on pagination, result limits, or what happens if no matches found. The core behavior is clear but not exhaustive.

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?

The description is concise with only a few sentences, front-loading the purpose and trigger phrases. Every sentence adds value, and there is no unnecessary information.

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?

The description covers trigger phrases, search scope, and case-insensitivity. It also hints at base_dir fallback logic. However, it does not describe the return format (e.g., list of sessions, matched snippets). Given no output schema, this gap slightly reduces completeness.

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% with all parameters described. The description reinforces the keyword parameter's case-insensitivity and search scope, but adds little beyond the schema. The baseline of 3 is appropriate given high coverage.

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 '搜索会话' (search sessions) and provides specific trigger phrases for invocation. It distinguishes from sibling tools like delete_session, list_sessions, read_session, save_session by focusing on searching across files and content.

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

Usage Guidelines4/5

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

The description includes explicit trigger phrases like '搜索包含 XX 的会话' and '查找关于 XX 的对话', giving clear context for when to use the tool. It does not explicitly mention when not to use or provide alternatives, but the usage context is strong.

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