mono/packages/kbot/docs_/tools.md
2025-02-20 14:44:05 +01:00

2.9 KiB

LLM Tools Documentation

Filesystem Tools (fs)

  • list_files: List all files in a directory

    • Parameters:
      • directory: (string, required) Directory path to list files from
      • pattern: (string, optional) Glob pattern for filtering files
  • remove_file: Remove a file at given path

    • Parameters:
      • path: (string, required) Path of the file to remove
  • rename_file: Rename or move a file or directory

    • Parameters:
      • src: (string, required) Source path
      • dst: (string, required) Destination path
  • modify_project_files: Modify existing project files

    • Parameters:
      • files: (array, required) Array of file objects with path and content
  • create_project_structure: Create project structure with files and folders

    • Parameters:
      • files: (array, required) Array of file objects with path and content
  • create_file: Creates a file, given a path and content

    • Parameters:
      • file: (object, required) Object containing path and content
  • read_file: Read a file at given path

    • Parameters:
      • file: (object, required) Object containing path

NPM Tools (npm)

  • build_project: Build project using pnpm build command

    • Parameters: None required
  • run_npm: Run an npm/pnpm command

    • Parameters:
      • command: (string, required) Command to run (e.g. install, test, etc)
      • args: (array, optional) Additional arguments for the command
  • install_dependency: Install a dependency using npm

    • Parameters:
      • dependencies: (array, required) Array of dependency names

Git Tools (git)

  • init_repository: Initialize a new git repository if not exists

    • Parameters: None required
  • commit_files_git: Commit files using git

    • Parameters:
      • files: (array, required) Array of file paths to commit
      • message: (string, required) Commit message

Terminal Tools (terminal)

  • execute_command: Execute a terminal command and capture output
    • Parameters:
      • command: (string, required) Command to execute
      • args: (array, optional) Command arguments
      • cwd: (string, optional) Working directory for command execution
      • background: (boolean, optional) Run command in background (non-blocking)
      • window: (boolean, optional) Open command in new terminal window
      • detached: (boolean, optional) Run process detached from parent

Interactive Tools (interact)

  • ask_question: Ask user a simple question and get response

    • Parameters:
      • question: (string, required) Question to ask the user
      • default: (string, optional) Default answer
  • choose_option: Ask user to choose from multiple options

    • Parameters:
      • message: (string, required) Message to show the user
      • choices: (array, required) List of choices
      • multiple: (boolean, optional) Allow multiple selections

User Tools (user)

  • capture_screen: Capture a screenshot of the entire screen or a specific region
    • Parameters: None required