{
  "@context": "https://schema.org",
  "@id": "https://aggr.aymericbeaumet.com/items/ampcode-com/2025-10-22-more-tools-for-the-agent/#webpage",
  "@type": [
    "WebPage",
    "ArchiveComponent"
  ],
  "articleBody": "We shipped several changes to [toolboxes](https://ampcode.com/manual#toolboxes) that make them easier to use:\n\n- You can now have multiple toolboxes in the `AMP_TOOLBOX` environment variable\n- `amp tools make` is a new command to create a functional example tool in the right location\n- `amp tools show` lets you inspect a tool\n- `amp tools use` allows you to execute it\n\nAnd Amp itself can fill in all the details to make the tool work as you intended.\n\nIf you don't yet know what [toolboxes](https://ampcode.com/manual#toolboxes) are: a toolbox is a directory full of UNIX-style programs that provide custom tools to the agent locally. Conceptually, they sit between MCP servers and common CLI tools, but are less complex than MCP servers and easier for the agent to use than plain CLI tools.\n\nLet's use an example to see how we can use `amp tools make` and `amp tools use` to create and run a new tool in a new toolbox.\n\nLet's build a `run_tests` tool. Chances are that if you have used any coding agent before, you've probably seen it trying to run the your tests, but then stumble and having to guess a few times what the correct command invocation is. We can make (artificial) life for the agent easier by giving it a `run_tests` tool that will always use the correct command.\n\nFirst we create a `.amp/tools` directory in our repository and add it to the `AMP_TOOLBOX` variable, so Amp knows to look there for tools:\n\n```bash\n# Create the directory\nmkdir -p .amp/tools\n# Add to AMP_TOOLBOX. Order matters: prefer tools in the repo over global tools\nexport AMP_TOOLBOX=\"$PWD/.amp/tools:$HOME/.config/amp/tools\"\n```\n\nNext we run `amp tools make` to create a new tool, using a built-in template:\n\n```bash\namp tools make run_tests\n```\n\nWhich prints:\n\n```\nTool created at: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests\nInspect with: amp tools show tb__run_tests\nExecute with: amp tools use tb__run_tests\n```\n\nGreat! Now we could open `.amp/tools/run_tests` manually and edit it as needed, so it actually does what we want and runs the tests. But, hey, we can also tell Amp to inspect our `package.json` file, find the right test command, and adjust the tool template accordingly:\n\n```bash\namp --dangerously-allow-all -x 'Edit .amp/tools/run_tests to run the tests\nusing pnpm test according to our package.json file.\nIt should have an optional workspace parameter\nand an optional parameter for filtering by test name'\n```\n\nNow we can use `amp tools show` to inspect the tool and see what Amp has created:\n\n```\namp tools show tb__run_tests\n```\n\nThat prints the description of the tool (which the Amp agent will see) and the schema of the input parameters (which the agent will use to run the tool):\n\n```\n# tb__run_tests (toolbox: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests)\n\nYou must use this tool to run tests instead of using the Bash tool.\nThis tool runs tests using pnpm test with optional workspace filtering\nand test name filtering.\n\n# Schema\n\n- workspace (string): optional workspace name to run tests in (e.g., \"core\", \"web\", \"server\", \"cli\"). If not provided, runs tests in the root workspace\n- testName (string): optional test name filter to run specific tests (passed as -t argument to vitest)\n```\n\nBut before we now have the agent try it, we can use `amp tools use` to execute the tool to make sure it works:\n\n```\namp tools use --only output tb__run_tests --testName \"writes a tool\"\n```\n\nNote how we specified `--testName`, one of the input parameters of the tool. If we run the command, we'll see something like this:\n\n```\n# ...\n Test Files  1 passed | 306 skipped (307)\n      Tests  1 passed | 4181 skipped (4182)\n```\n\nIt works! And now, when you start Amp, it will automatically register this tool at startup, and use it to run the tests:\n",
  "authors": [],
  "captured_at": "2026-10-04T12:50:30.804479567+00:00",
  "category": "programming",
  "content_html": "<p>We shipped several changes to <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/manual#toolboxes\">toolboxes</a> that make them easier to use:</p>\n<ul>\n<li>You can now have multiple toolboxes in the <code>AMP_TOOLBOX</code> environment variable</li>\n<li><code>amp tools make</code> is a new command to create a functional example tool in the right location</li>\n<li><code>amp tools show</code> lets you inspect a tool</li>\n<li><code>amp tools use</code> allows you to execute it</li>\n</ul>\n<p>And Amp itself can fill in all the details to make the tool work as you intended.</p>\n<p>If you don't yet know what <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://ampcode.com/manual#toolboxes\">toolboxes</a> are: a toolbox is a directory full of UNIX-style programs that provide custom tools to the agent locally. Conceptually, they sit between MCP servers and common CLI tools, but are less complex than MCP servers and easier for the agent to use than plain CLI tools.</p>\n<p>Let's use an example to see how we can use <code>amp tools make</code> and <code>amp tools use</code> to create and run a new tool in a new toolbox.</p>\n<p>Let's build a <code>run_tests</code> tool. Chances are that if you have used any coding agent before, you've probably seen it trying to run the your tests, but then stumble and having to guess a few times what the correct command invocation is. We can make (artificial) life for the agent easier by giving it a <code>run_tests</code> tool that will always use the correct command.</p>\n<p>First we create a <code>.amp/tools</code> directory in our repository and add it to the <code>AMP_TOOLBOX</code> variable, so Amp knows to look there for tools:</p>\n<pre><code class=\"language-bash\"><span class=\"code-snippet\" data-language=\"Shell\"><span class=\"syntax-source syntax-shell syntax-bash\"><span class=\"syntax-comment syntax-line syntax-number-sign syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell\">#</span></span><span class=\"syntax-comment syntax-line syntax-number-sign syntax-shell\"> Create the directory</span><span class=\"syntax-comment syntax-line syntax-number-sign syntax-shell\">\n</span><span class=\"syntax-meta syntax-function-call syntax-shell\"><span class=\"syntax-variable syntax-function syntax-shell\">mkdir</span></span><span class=\"syntax-meta syntax-function-call syntax-arguments syntax-shell\"><span class=\"syntax-variable syntax-parameter syntax-option syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-parameter syntax-shell\"> -</span>p</span> .amp/tools</span>\n<span class=\"syntax-comment syntax-line syntax-number-sign syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-begin syntax-shell\">#</span></span><span class=\"syntax-comment syntax-line syntax-number-sign syntax-shell\"> Add to AMP_TOOLBOX. Order matters: prefer tools in the repo over global tools</span><span class=\"syntax-comment syntax-line syntax-number-sign syntax-shell\">\n</span><span class=\"syntax-meta syntax-function-call syntax-shell\"><span class=\"syntax-storage syntax-modifier syntax-shell\">export</span> <span class=\"syntax-variable syntax-other syntax-readwrite syntax-assignment syntax-shell\">AMP_TOOLBOX</span><span class=\"syntax-keyword syntax-operator syntax-assignment syntax-shell\">=</span><span class=\"syntax-string syntax-unquoted syntax-shell\"><span class=\"syntax-string syntax-quoted syntax-double syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-shell\">&quot;</span><span class=\"syntax-meta syntax-group syntax-expansion syntax-parameter syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-variable syntax-shell\">$</span><span class=\"syntax-variable syntax-other syntax-readwrite syntax-shell\">PWD</span></span>/.amp/tools:<span class=\"syntax-meta syntax-group syntax-expansion syntax-parameter syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-variable syntax-shell\">$</span><span class=\"syntax-variable syntax-other syntax-readwrite syntax-shell\">HOME</span></span>/.config/amp/tools<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-shell\">&quot;</span></span></span></span>\n</span></span></code></pre>\n<p>Next we run <code>amp tools make</code> to create a new tool, using a built-in template:</p>\n<pre><code class=\"language-bash\"><span class=\"code-snippet\" data-language=\"Shell\"><span class=\"syntax-source syntax-shell syntax-bash\"><span class=\"syntax-meta syntax-function-call syntax-shell\"><span class=\"syntax-variable syntax-function syntax-shell\">amp</span></span><span class=\"syntax-meta syntax-function-call syntax-arguments syntax-shell\"> tools make run_tests</span>\n</span></span></code></pre>\n<p>Which prints:</p>\n<pre><code><span class=\"code-snippet\">Tool created at: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests\nInspect with: amp tools show tb__run_tests\nExecute with: amp tools use tb__run_tests\n</span></code></pre>\n<p>Great! Now we could open <code>.amp/tools/run_tests</code> manually and edit it as needed, so it actually does what we want and runs the tests. But, hey, we can also tell Amp to inspect our <code>package.json</code> file, find the right test command, and adjust the tool template accordingly:</p>\n<pre><code class=\"language-bash\"><span class=\"code-snippet\" data-language=\"Shell\"><span class=\"syntax-source syntax-shell syntax-bash\"><span class=\"syntax-meta syntax-function-call syntax-shell\"><span class=\"syntax-variable syntax-function syntax-shell\">amp</span></span><span class=\"syntax-meta syntax-function-call syntax-arguments syntax-shell\"><span class=\"syntax-variable syntax-parameter syntax-option syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-parameter syntax-shell\"> --</span>dangerously-allow-all</span><span class=\"syntax-variable syntax-parameter syntax-option syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-parameter syntax-shell\"> -</span>x</span> <span class=\"syntax-string syntax-quoted syntax-single syntax-shell\"><span class=\"syntax-punctuation syntax-definition syntax-string syntax-begin syntax-shell\">&#39;</span>Edit .amp/tools/run_tests to run the tests\nusing pnpm test according to our package.json file.\nIt should have an optional workspace parameter\nand an optional parameter for filtering by test name<span class=\"syntax-punctuation syntax-definition syntax-string syntax-end syntax-shell\">&#39;</span></span></span>\n</span></span></code></pre>\n<p>Now we can use <code>amp tools show</code> to inspect the tool and see what Amp has created:</p>\n<pre><code><span class=\"code-snippet\">amp tools show tb__run_tests\n</span></code></pre>\n<p>That prints the description of the tool (which the Amp agent will see) and the schema of the input parameters (which the agent will use to run the tool):</p>\n<pre><code><span class=\"code-snippet\" data-language=\"YAML\"><span class=\"syntax-source syntax-yaml\"><span class=\"syntax-comment syntax-line syntax-number-sign syntax-yaml\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-line syntax-number-sign syntax-yaml\">#</span> tb__run_tests (toolbox: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests)\n</span>\n<span class=\"syntax-string syntax-unquoted syntax-plain syntax-out syntax-yaml\">You must use this tool to run tests instead of using the Bash tool.</span>\n<span class=\"syntax-string syntax-unquoted syntax-plain syntax-out syntax-yaml\">This tool runs tests using pnpm test with optional workspace filtering</span>\n<span class=\"syntax-string syntax-unquoted syntax-plain syntax-out syntax-yaml\">and test name filtering.</span>\n\n<span class=\"syntax-comment syntax-line syntax-number-sign syntax-yaml\"><span class=\"syntax-punctuation syntax-definition syntax-comment syntax-line syntax-number-sign syntax-yaml\">#</span> Schema\n</span>\n<span class=\"syntax-punctuation syntax-definition syntax-block syntax-sequence syntax-item syntax-yaml\">-</span> <span class=\"syntax-string syntax-unquoted syntax-plain syntax-out syntax-yaml\"><span class=\"syntax-entity syntax-name syntax-tag syntax-yaml\">workspace (string)</span></span><span class=\"syntax-punctuation syntax-separator syntax-key-value syntax-mapping syntax-yaml\">:</span> <span class=\"syntax-string syntax-unquoted syntax-plain syntax-out syntax-yaml\">optional workspace name to run tests in (e.g., &quot;core&quot;, &quot;web&quot;, &quot;server&quot;, &quot;cli&quot;). If not provided, runs tests in the root workspace</span>\n<span class=\"syntax-punctuation syntax-definition syntax-block syntax-sequence syntax-item syntax-yaml\">-</span> <span class=\"syntax-string syntax-unquoted syntax-plain syntax-out syntax-yaml\"><span class=\"syntax-entity syntax-name syntax-tag syntax-yaml\">testName (string)</span></span><span class=\"syntax-punctuation syntax-separator syntax-key-value syntax-mapping syntax-yaml\">:</span> <span class=\"syntax-string syntax-unquoted syntax-plain syntax-out syntax-yaml\">optional test name filter to run specific tests (passed as -t argument to vitest)</span>\n</span></span></code></pre>\n<p>But before we now have the agent try it, we can use <code>amp tools use</code> to execute the tool to make sure it works:</p>\n<pre><code><span class=\"code-snippet\">amp tools use --only output tb__run_tests --testName &quot;writes a tool&quot;\n</span></code></pre>\n<p>Note how we specified <code>--testName</code>, one of the input parameters of the tool. If we run the command, we'll see something like this:</p>\n<pre><code><span class=\"code-snippet\"># ...\n Test Files  1 passed | 306 skipped (307)\n      Tests  1 passed | 4181 skipped (4182)\n</span></code></pre>\n<p>It works! And now, when you start Amp, it will automatically register this tool at startup, and use it to run the tests:</p>\n",
  "content_markdown": "We shipped several changes to [toolboxes](https://ampcode.com/manual#toolboxes) that make them easier to use:\n\n- You can now have multiple toolboxes in the `AMP_TOOLBOX` environment variable\n- `amp tools make` is a new command to create a functional example tool in the right location\n- `amp tools show` lets you inspect a tool\n- `amp tools use` allows you to execute it\n\nAnd Amp itself can fill in all the details to make the tool work as you intended.\n\nIf you don't yet know what [toolboxes](https://ampcode.com/manual#toolboxes) are: a toolbox is a directory full of UNIX-style programs that provide custom tools to the agent locally. Conceptually, they sit between MCP servers and common CLI tools, but are less complex than MCP servers and easier for the agent to use than plain CLI tools.\n\nLet's use an example to see how we can use `amp tools make` and `amp tools use` to create and run a new tool in a new toolbox.\n\nLet's build a `run_tests` tool. Chances are that if you have used any coding agent before, you've probably seen it trying to run the your tests, but then stumble and having to guess a few times what the correct command invocation is. We can make (artificial) life for the agent easier by giving it a `run_tests` tool that will always use the correct command.\n\nFirst we create a `.amp/tools` directory in our repository and add it to the `AMP_TOOLBOX` variable, so Amp knows to look there for tools:\n\n```bash\n# Create the directory\nmkdir -p .amp/tools\n# Add to AMP_TOOLBOX. Order matters: prefer tools in the repo over global tools\nexport AMP_TOOLBOX=\"$PWD/.amp/tools:$HOME/.config/amp/tools\"\n```\n\nNext we run `amp tools make` to create a new tool, using a built-in template:\n\n```bash\namp tools make run_tests\n```\n\nWhich prints:\n\n```\nTool created at: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests\nInspect with: amp tools show tb__run_tests\nExecute with: amp tools use tb__run_tests\n```\n\nGreat! Now we could open `.amp/tools/run_tests` manually and edit it as needed, so it actually does what we want and runs the tests. But, hey, we can also tell Amp to inspect our `package.json` file, find the right test command, and adjust the tool template accordingly:\n\n```bash\namp --dangerously-allow-all -x 'Edit .amp/tools/run_tests to run the tests\nusing pnpm test according to our package.json file.\nIt should have an optional workspace parameter\nand an optional parameter for filtering by test name'\n```\n\nNow we can use `amp tools show` to inspect the tool and see what Amp has created:\n\n```\namp tools show tb__run_tests\n```\n\nThat prints the description of the tool (which the Amp agent will see) and the schema of the input parameters (which the agent will use to run the tool):\n\n```\n# tb__run_tests (toolbox: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests)\n\nYou must use this tool to run tests instead of using the Bash tool.\nThis tool runs tests using pnpm test with optional workspace filtering\nand test name filtering.\n\n# Schema\n\n- workspace (string): optional workspace name to run tests in (e.g., \"core\", \"web\", \"server\", \"cli\"). If not provided, runs tests in the root workspace\n- testName (string): optional test name filter to run specific tests (passed as -t argument to vitest)\n```\n\nBut before we now have the agent try it, we can use `amp tools use` to execute the tool to make sure it works:\n\n```\namp tools use --only output tb__run_tests --testName \"writes a tool\"\n```\n\nNote how we specified `--testName`, one of the input parameters of the tool. If we run the command, we'll see something like this:\n\n```\n# ...\n Test Files  1 passed | 306 skipped (307)\n      Tests  1 passed | 4181 skipped (4182)\n```\n\nIt works! And now, when you start Amp, it will automatically register this tool at startup, and use it to run the tests:\n",
  "dateCreated": "2026-10-04T12:50:30.804479567+00:00",
  "date_created": "2025-10-22T00:00:00+00:00",
  "date_modified": "2025-10-22T00:00:00+00:00",
  "date_published": "2025-10-22T00:00:00+00:00",
  "description": "We shipped several changes to toolboxes that make them easier to use: You can now have multiple toolboxes in the AMP_TOOLBOX environment variable amp tools make is a new command to create a functional example tool in the right location amp…",
  "external_url": "https://ampcode.com/news/more-tools-for-the-agent",
  "git": {
    "commit": "ebb0941c5c06a2ab2377342d607535262a3e969e",
    "path": "items/ampcode-com/2025/10/2025-10-22-more-tools-for-the-agent.md",
    "permalink": "https://github.com/aymericbeaumet/aggr-instance/blob/ebb0941c5c06a2ab2377342d607535262a3e969e/items/ampcode-com/2025/10/2025-10-22-more-tools-for-the-agent.md"
  },
  "id": "urn:aggr:item:2488d21c9414fd79ac372e15944f95208827eb4d",
  "isBasedOn": {
    "@id": "https://ampcode.com/news/more-tools-for-the-agent"
  },
  "mainEntity": {
    "@id": "https://ampcode.com/news/more-tools-for-the-agent",
    "@type": "CreativeWork",
    "archivedAt": {
      "@id": "https://aggr.aymericbeaumet.com/items/ampcode-com/2025-10-22-more-tools-for-the-agent/#webpage"
    },
    "dateModified": "2025-10-22T00:00:00+00:00",
    "datePublished": "2025-10-22T00:00:00+00:00",
    "headline": "More Tools for the Agent",
    "timeRequired": "PT3M",
    "url": "https://ampcode.com/news/more-tools-for-the-agent",
    "wordCount": 625
  },
  "name": "Archived snapshot: More Tools for the Agent",
  "preview": null,
  "reading_minutes": 3,
  "replicated_at": null,
  "source": "ampcode-com",
  "source_name": "Amp News",
  "summary": "We shipped several changes to toolboxes that make them easier to use: You can now have multiple toolboxes in the AMP_TOOLBOX environment variable amp tools make is a new command to create a functional example tool in the right location amp tools show lets you inspect a tool amp tools use allows you to execute it And Amp itself can fill in all the details to make the tool work as you intended. If you don't yet know what toolboxes are: a toolbox is a directory full of UNIX-style programs that provide custom tools to the agent locally. Conceptually, they sit between MCP servers and common CLI tools, but are less complex than MCP servers and easier for the agent to use than plain CLI tools. Let's use an example to see how we can use amp tools make and amp tools use to create and run a new tool in a new toolbox. Let's build a run_tests tool. Chances are that if you have used any coding agent before, you've probably seen it trying to run the your tests, but then stumble and having to guess a few times what the correct command invocation is. We can make (artificial) life for the agent easier by giving it a run_tests tool that will always use the correct command. First we create a .amp/tools directory in our repository and add it to the AMP_TOOLBOX variable, so Amp knows to look there for tools: # Create the directory mkdir -p .amp/tools # Add to AMP_TOOLBOX. Order matters: prefer tools in the repo over global tools export AMP_TOOLBOX=\"$PWD/.amp/tools:$HOME/.config/amp/tools\" Next we run amp tools make to create a new tool, using a built-in template: amp tools make run_tests Which prints: Tool created at: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests Inspect with: amp tools show tb__run_tests Execute with: amp tools use tb__run_tests Great! Now we could open .amp/tools/run_tests manually and edit it as needed, so it actually does what we want and runs the tests. But, hey, we can also tell Amp to inspect our package.json file, find the right test command, and adjust the tool template accordingly: amp --dangerously-allow-all -x 'Edit .amp/tools/run_tests to run the tests using pnpm test according to our package.json file. It should have an optional workspace parameter and an optional parameter for filtering by test name' Now we can use amp tools show to inspect the tool and see what Amp has created: amp tools show tb__run_tests That prints the description of the tool (which the Amp agent will see) and the schema of the input parameters (which the agent will use to run the tool): # tb__run_tests (toolbox: /Users/dhamidi/w/amp-wip/.amp/tools/run_tests) You must use this tool to run tests instead of using the Bash tool. This tool runs tests using pnpm test with optional workspace filtering and test name filtering. # Schema - workspace (string): optional workspace name to run tests in (e.g., \"core\", \"web\", \"server\", \"cli\"). If not provided, runs tests in the root workspace - testName (string): optional test name filter to run specific tests (passed as -t argument to vitest) But before we now have the agent try it, we can use amp tools use to execute the tool to make sure it works: amp tools use --only output tb__run_tests --testName \"writes a tool\" Note how we specified --testName, one of the input parameters of the tool. If we run the command, we'll see something like this: # ... Test Files 1 passed | 306 skipped (307) Tests 1 passed | 4181 skipped (4182) It works! And now, when you start Amp, it will automatically register this tool at startup, and use it to run the tests:",
  "tags": [],
  "temporalCoverage": "2026-10-04T12:50:30.804479567+00:00",
  "title": "More Tools for the Agent",
  "url": "https://aggr.aymericbeaumet.com/items/ampcode-com/2025-10-22-more-tools-for-the-agent/",
  "word_count": 625
}