Skip to main content
Glama

save_session

Save AI conversations as Markdown files, auto-categorized by IDE and date for organized storage and retrieval.

Instructions

【保存会话】当用户说"保存当前会话"、"存储会话"、"记录对话"、"保存对话内容"等时调用。将AI对话内容保存为Markdown文件,按IDE/日期自动分类存储。

⚠️ 调用前必须执行的步骤:

  1. AI助手必须先在内部整理完整的对话历史

  2. 将所有用户问题和AI回答按时间顺序格式化

  3. 使用清晰的Markdown格式(# 用户、# AI助手等标题)

  4. 将整理好的完整对话作为content参数传入

❌ 禁止行为:

  • 禁止传入对话摘要或总结

  • 禁止遗漏任何历史问答

  • 禁止使用简化格式

✅ 正确格式示例:

用户

[第一个问题的完整内容...]

AI助手

[第一个回答的完整内容...]

用户

[第二个问题的完整内容...]

AI助手

[第二个回答的完整内容...]

触发词:保存、存储、记录、归档会话/对话/聊天

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes会话内容 - 必须是完整的原始对话记录,包含所有用户问题和AI回答。 ⚠️ 重要要求: 1. 必须包含从对话开始到现在的所有交互内容 2. 保持原始对话的完整性,不要总结或精简 3. 使用清晰的Markdown格式标记每轮对话 4. 保留代码块、列表、表格等所有格式 ✅ 标准格式: # 用户 [完整问题内容,包括所有细节] # AI助手 [完整回答内容,包括所有代码、解释、建议] # 用户 [下一个问题...] # AI助手 [下一个回答...] ❌ 错误示例: - "用户询问了关于X的问题,AI回答了Y"(这是总结,不是完整对话) - 只包含最近几轮对话(遗漏了历史内容)
base_dirNo保存会话的基础目录路径(可选,优先级最高。未指定时依次使用: 环境变量MCP_SESSION_BASE_DIR > config.json配置 > 默认路径~/Documents/ide_sessions)
ide_nameYesIDE名称(如: Qoder, VSCode, Cursor, Windsurf, Claude等),用于分类存储
session_timeNo会话时间(ISO 8601格式,可选,默认为当前时间)
session_descriptionYes会话描述(简短概括本次对话的主题,如:实现用户登录功能、修复数据库bug等)
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool saves markdown files with automatic categorization, and mandates full conversation content. It does not mention file overwrite behavior, authorization needs, or rate limits, leaving some behavioral gaps.

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 well-structured with clear sections: purpose, pre-steps, prohibitions, examples, and trigger words. It is front-loaded with purpose. However, it is somewhat verbose; the pre-steps and prohibitions could be condensed without losing clarity.

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?

Given 5 parameters, no output schema, and no annotations, the description covers essential usage: content formatting, directory resolution, and prohibited actions. It lacks explicit info on return values or confirmation of success, but for a save operation this is acceptable.

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%, baseline is 3. The description adds significant meaning beyond schema, especially for 'content' with detailed format requirements, examples, and prohibited patterns. It also explains fallback logic for 'base_dir'.

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 explicitly states the tool saves AI conversation as a Markdown file, auto-categorized by IDE and date. It is clearly distinct from sibling tools (delete, list, read, search) with a specific verb and resource.

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?

Provides trigger words for when to call (e.g., 'save current session') and explicit prohibited behavior (no summaries, no omissions). However, it does not explicitly discuss when not to use or compare to alternatives, though siblings are distinct.

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