Skip to main content
Glama

add_playbook

Record a completed multi-step operational procedure as a structured playbook with trigger keywords, enabling quick retrieval and reuse instead of rediscovering steps.

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.

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: 标题相似但确属另一份手册时,显式绕过相似度门存为新条目(可选,默认 false;同标题不同正文的去重拒绝会带修订指引)。 / When the similar title is genuinely a DIFFERENT playbook, explicitly bypass the similarity gate (optional, default false; same-title-different-body rejections carry revision guidance).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
domainNo
run_idNo
outcomeNo
pitfallsNo
triggersYes
tool_refsNo
scope_typeNoglobal
steps_jsonNo[]
descriptionNo
source_toolNo
source_agentNo
preconditionsNo
project_folderNo
user_confirmedNo
allow_similar_newNo
last_validated_atNo
required_tools_jsonNo[]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.19.1
    • addedInput schema / properties / allow_similar_new
      Added value: +{
      +  "default": false,
      +  "title": "Allow Similar New",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv4.13.0
    • addedInput schema / properties / user_confirmed
      Added value: +{
      +  "default": false,
      +  "title": "User Confirmed",
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changedv3.55.0
    • addedInput schema / properties / required_tools_json
      Added value: +{
      +  "default": "[]",
      +  "title": "Required Tools Json",
      +  "type": "string"
      +}
    • addedInput schema / properties / tool_refs
      Added value: +{
      +  "default": "",
      +  "title": "Tool Refs",
      +  "type": "string"
      +}
  4. Changed5 schema fields changedv3.48.0
    • addedInput schema / properties / last_validated_at
      Added value: +{
      +  "default": "",
      +  "title": "Last Validated At",
      +  "type": "string"
      +}
    • addedInput schema / properties / project_folder
      Added value: +{
      +  "default": "",
      +  "title": "Project Folder",
      +  "type": "string"
      +}
    • addedInput schema / properties / run_id
      Added value: +{
      +  "default": "",
      +  "title": "Run Id",
      +  "type": "string"
      +}
    • addedInput schema / properties / scope_type
      Added value: +{
      +  "default": "global",
      +  "title": "Scope Type",
      +  "type": "string"
      +}
    • addedInput schema / properties / source_agent
      Added value: +{
      +  "default": "",
      +  "title": "Source Agent",
      +  "type": "string"
      +}
  5. Addedv3.29.1

TDQS

A3.9/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explains that each playbook is stored as an individual file, is retrievable via trigger keywords, and that similar-title handling includes a bypass flag and deduplication guidance. It does not mention permissions, overwriting behavior, or other side effects, but the core write behavior and uniqueness constraints are clearly described.

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: purpose first, storage model second, then parameter explanations. It is bilingual, which adds length and some redundancy, but each section carries meaningful content and the core information is front-loaded.

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?

For an 18-parameter write tool with no annotations and no schema descriptions, the description covers the main usage, storage model, and deduplication behavior well. However, six schema parameters are left unexplained, including non-obvious ones like scope_type and user_confirmed, which could lead an agent to make incorrect calls or omit important context. The presence of an output schema reduces concern about return-value documentation.

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?

The schema has 0% description coverage across 18 parameters, so the description must compensate. It does so for 12 parameters, adding valuable semantics such as the steps_json element structure (order/action/detail), required_tools_json's no-local-paths rule, and allow_similar_new's nuanced bypass condition. Six parameters (run_id, scope_type, source_agent, project_folder, user_confirmed, last_validated_at) remain undocumented, though some are partially inferable from their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Record an operational playbook — a structured multi-step procedure.' It also gives concrete use cases (publishing to a registry, app deployment) and describes the storage/retrieval model, which helps distinguish it from generic memory or lesson tools. It does not explicitly name sibling alternatives, so it falls short of a 5.

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 clearly says when to use the tool: after completing a multi-step operational process, to preserve steps and experience for future reuse. It does not, however, state when not to use it or explicitly compare it with sibling tools like memory_store, add_lesson, or add_decision.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.