Tools

Tools are the actions the agent can take. Each tool is a typed function that the model can call during a run. Testy Claw ships four built-in tools and lets you add your own.

Built-in tools

ToolKeyWhat it does
FilesystemfsRead, write, list, delete, and move files and directories
ShellshellExecute shell commands and capture stdout/stderr
HTTPhttpMake GET, POST, PUT, DELETE requests to any URL
GitgitStage, commit, branch, diff, and push via Git

Enabling tools

Tools are opt-in. List the ones you want in claw.config.ts. The agent can only use tools that are explicitly enabled.

claw.config.ts
import { defineConfig } from "testy-claw";

export default defineConfig({
  tools: ["fs", "shell", "http", "git"],
});
WarningOnly enable tools your task actually needs. Enabling shell gives the agent the ability to run arbitrary commands — review the plan before running in sensitive environments.

Custom tools

Register your own tools by exporting a tools array from your config. Each tool needs a name, description (used by the model to decide when to call it), input schema, and an execute function.

claw.config.ts
import { defineConfig, defineTool } from "testy-claw";
import { z } from "zod";

const sendSlack = defineTool({
  name: "send_slack",
  description: "Send a message to a Slack channel",
  input: z.object({
    channel: z.string(),
    message: z.string(),
  }),
  execute: async ({ channel, message }) => {
    await fetch("https://slack.com/api/chat.postMessage", {
      method: "POST",
      headers: { Authorization: `Bearer ${process.env.SLACK_TOKEN}` },
      body: JSON.stringify({ channel, text: message }),
    });
    return { ok: true };
  },
});

export default defineConfig({
  tools: ["fs", sendSlack],
});

Tool output

Every tool call and its result is recorded in the run log. You can inspect them with testy-claw replay or read the raw JSON in .claw/runs/.