add_playbook
Record a multi-step operational playbook with trigger keywords and structured steps, so completed workflows can be retrieved and reused later.
Instructions
记录操作手册(Playbook)— 结构化的多步骤流程。 / Record an operational playbook — a structured multi-step procedure.
用途:完成一个多步骤操作流程后(如发布到 Registry、上架应用等),将步骤和经验记录为 Playbook,
方便日后调取复用,避免重复摸索。
Purpose: After completing a multi-step operational process (publishing to a registry, app deployment, etc.),
record the steps as a Playbook for future retrieval.
每条 Playbook 独立存储为单个文件,通过 triggers(记忆点关键词)快速调取。
Each Playbook is stored as an individual file, quickly retrievable via trigger keywords.
经 MCP 写入的 Playbook 一律进入待审(任何审批模式),主人用 engram review 批准后才会被使用。
A playbook written over MCP always waits in the review queue (every approval mode); it is used
only after the Owner approves it with engram review.
Args:
title: 流程名称,如 'MCP Registry 发布流程'。 / Playbook name, e.g., 'MCP Registry publish workflow'.
triggers: 记忆点关键词,逗号分隔,如 '发布,registry,上架'。 / Trigger keywords (comma-separated) for quick retrieval.
steps_json: 步骤 JSON 数组,每个元素含 order/action/detail。 / Steps as a JSON array, each with order/action/detail.
required_tools_json: 工具依赖 JSON 数组(可选),只声明工具名/用途,不写本机路径。 / Tool dependencies JSON array (optional); declares names/purposes, not local paths.
tool_refs: 简写工具名,逗号分隔(可选)。 / Shorthand tool names, comma-separated (optional).
description: 流程概述(可选)。 / Brief description (optional).
domain: 技术领域,逗号分隔(可选)。 / Domain labels, comma-separated (optional).
preconditions: 前提条件,逗号分隔(可选)。 / Preconditions, comma-separated (optional).
pitfalls: 常见陷阱,逗号分隔(可选)。 / Common pitfalls, comma-separated (optional).
outcome: 预期结果(可选)。 / Expected outcome (optional).
source_tool: 来源工具(可选)。 / Source tool (optional).
allow_similar_new: 标题相似但不相同、确属另一份手册时设为 true,写入新条目(可选,默认 false)。不能绕过标题完全相同的拒绝;该拒绝会指向已有手册并给出修订方式。 / Set true when a similar but not identical title is genuinely a DIFFERENT playbook, to store it as a new entry (optional, default false). It cannot bypass the refusal of an identical title; that refusal names the existing playbook and how to revise it.
supersedes: 本手册修订的已有 playbook ID(可选)。修订提案总是进入待审,主人批准后旧手册才归档;被主人钉住的手册只能这样修订。 / ID of the existing playbook this one revises (optional). A revision is always a proposal that waits for the Owner; the old playbook is retired only on approval. An Owner-pinned playbook can only be revised this way.
supersedes_expected_version: 填写 supersedes 时必填:旧手册的当前版本号。缺失 → version_required,不匹配 → version_conflict,均零写入。 / Required with supersedes: the old playbook's current version. Missing -> version_required; mismatch -> version_conflict; both write nothing.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"title": "<title>",
"triggers": "<triggers>"
},
"name": "add_playbook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| domain | No | ||
| run_id | No | ||
| outcome | No | ||
| pitfalls | No | ||
| triggers | Yes | ||
| tool_refs | No | ||
| scope_type | No | global | |
| steps_json | No | [] | |
| supersedes | No | ||
| description | No | ||
| source_tool | No | ||
| source_agent | No | ||
| preconditions | No | ||
| project_folder | No | ||
| user_confirmed | No | ||
| allow_similar_new | No | ||
| last_validated_at | No | ||
| required_tools_json | No | [] | |
| supersedes_expected_version | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |