Home/Tools/@tpmjs/tools-runbook-draft

runbookDraftTool

@tpmjs/tools-runbook-draft

Draft operational runbooks from procedure steps with commands and verification. Creates structured documentation for operational procedures with optional command examples and verification steps.

Official
documentation
v0.2.0
MIT

Interactive Playground

Test @tpmjs/tools-runbook-draft (runbookDraftTool) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-runbook-draft
pnpm add @tpmjs/tools-runbook-draft
yarn add @tpmjs/tools-runbook-draft
bun add @tpmjs/tools-runbook-draft
deno add npm:@tpmjs/tools-runbook-draft

2. Import the tool

import { runbookDraftTool } from '@tpmjs/tools-runbook-draft';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { runbookDraftTool } from '@tpmjs/tools-runbook-draft';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { runbookDraftTool },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Parameters

Available configuration options

Auto-extracted
title
Required
Type: string

Title of the runbook

steps
Required
Type: array

Array of procedure steps

Schema extracted: 1/1/2026, 8:18:21 AM

README

@tpmjs/tools-runbook-draft

Draft operational runbooks from procedure steps with commands and verification.

Installation

npm install @tpmjs/tools-runbook-draft

Usage

import { runbookDraftTool } from '@tpmjs/tools-runbook-draft';

const result = await runbookDraftTool.execute({
  title: 'Database Migration Runbook',
  steps: [
    {
      action: 'Backup the database',
      command: 'pg_dump mydb > backup.sql',
      verification: 'Check that backup.sql exists and has content',
    },
    {
      action: 'Stop the application',
      command: 'systemctl stop myapp',
      verification: 'Run systemctl status myapp to confirm stopped',
    },
    {
      action: 'Run migrations',
      command: 'npm run migrate',
      verification: 'Check migration logs for errors',
    },
    {
      action: 'Start the application',
      command: 'systemctl start myapp',
      verification: 'Run systemctl status myapp to confirm running',
    },
  ],
});

console.log(result.runbook);
// Markdown-formatted runbook with all steps
console.log(`Steps: ${result.stepCount}`);
console.log(`Has commands: ${result.hasCommands}`);

Features

  • Generates structured markdown runbooks
  • Supports optional command examples in code blocks
  • Includes verification steps for each action
  • Automatically adds prerequisites section when commands are present
  • Timestamps generation for version tracking

Input

RunbookDraftInput

  • title (string, required): Title of the runbook
  • steps (array, required): Array of procedure steps

RunbookStep

  • action (string, required): Description of the action to perform
  • command (string, optional): Command to execute
  • verification (string, optional): Verification step to confirm success

Output

RunbookDraft

  • runbook (string): Markdown-formatted runbook document
  • stepCount (number): Number of steps in the runbook
  • hasCommands (boolean): Whether any steps include commands

License

MIT

Statistics

Downloads/month

0

Quality Score

0%

Bundle Size

NPM Keywords

tpmjs
documentation
runbook
operations
devops

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai