get_user_context
Retrieve tiered cold-start user context at conversation start to inject identity, preferences, quality standards, and lessons. Choose quick, standard, or full levels with optional token budget.
Instructions
获取用户的个性化上下文(冷启动,分层延迟可控)。 / Get tiered cold-start user context with latency control.
**Lifecycle: startup** — 对话开始时调用,为 AI 注入用户身份和上下文。
Lifecycle: startup — call at conversation start to inject user identity and context.
用途:在每次新对话开始时调用,了解用户是谁、如何工作、学到了什么、质量标准是什么。
Purpose: Call at the start of each new conversation to understand who the user is, how they work, what they have learned, and their quality bar.
分层说明 / Tiered behaviour:
- "quick": 仅身份画像 + 工作偏好(纯 JSON 读取,无文件扫描,最低延迟)。
Profile + preferences only — pure JSON reads, no filesystem scans. Lowest latency.
- "standard"(默认): 加上质量标准、经验领域、相关教训/决策、项目快照。
Default. Adds quality, domains, top lessons/decisions, project snapshot.
- "full": 完整上下文,含冲突检测、过期/暂存提醒。仅在用户明确要求"全量回顾"时使用。
Full context including conflict detection and stale/staging warnings. Use only when the user explicitly asks for a comprehensive memory review.
任何级别都只读:不扫描、不导入其它 AI 工具的文件(那是用户在终端运行的 `engram import-memories`)。
Every level only reads: other AI tools' files are never scanned or imported here (that is the user's `engram import-memories` command in a terminal).
注意:默认 "standard" 已覆盖绝大多数冷启动需求;只有用户问"我们之前所有决定/经验"或要做记忆健康检查时才用 "full"。
Note: "standard" covers most cold-start needs. Use "full" only when the user asks for a comprehensive memory review.
Args:
project_folder: 当前项目文件夹路径(可选)。 / Current project folder path (optional).
level: "quick" | "standard" | "full",默认 "standard"。 / Tier — defaults to "standard".
token_budget: 上下文 token 预算(可选)。设定后按优先级裁剪 section,低优先级 section 先丢弃,末尾一行注明省略了什么。不设则返回全量。
Optional token budget. When set, sections are included by priority until budget is exhausted;
a cut ends the context with one line naming what was left out.
user_prompt: 用户当前提问(可选)。传入后会追加到上下文末尾,并与已存 Playbook 的
triggers 关键词匹配,命中时浮现「相关 Playbook」小节(标题 + ID;用 get_playbooks(mode="get") 查看完整步骤)。
Optional current user prompt. Appended to the context and matched against stored
playbook trigger keywords; hits surface a "Matched Playbooks" section (title + id;
call get_playbooks(mode="get") for the full steps).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_user_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | standard | |
| user_prompt | No | ||
| token_budget | No | ||
| project_folder | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |