> For the complete documentation index, see [llms.txt](https://vibemx.gitbook.io/neuronai-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vibemx.gitbook.io/neuronai-studio/tools/make-tool-cli.md).

# Make Tool CLI

Generate a Neuron `Tool` PHP class scaffold from the command line.

## Command

```bash
php artisan neuronai-studio:make-tool {name}
```

Example:

```bash
php artisan neuronai-studio:make-tool WeatherLookup
```

Creates a tool class under your configured export path (default `app/Neuron/Tools/`).

## Generated structure

The command uses `ToolClassGenerator` with a stub template:

```
app/Neuron/Tools/WeatherLookup.php
```

The generated class extends Neuron's `Tool` base class with:

* Tool name and description placeholders
* `properties()` method for input schema
* `__invoke()` method for execution logic

## Workflow

```mermaid
flowchart LR
    CLI[make-tool command] --> Stub[tool.stub]
    Stub --> Class[PHP Tool class]
    Class --> Scan[ToolRegistry scan]
    Scan --> Bind[Bind to agent via class: ref]
```

1. Run `make-tool` to scaffold the class
2. Implement `__invoke()` with your logic
3. The class appears in the Tool Registry automatically
4. Bind to agents with ref `class:App\\Neuron\\Tools\\WeatherLookup`

## Export path configuration

```env
NEURONAI_STUDIO_EXPORT_NAMESPACE=App\\Neuron
NEURONAI_STUDIO_EXPORT_PATH=app/Neuron
```

## Alternative: builder tool first

For rapid prototyping, create a [Builder Tool](/neuronai-studio/tools/builder-tools.md) in the UI, test it in the Playground, then click **Export PHP** in the tool editor.

Both paths produce production-ready PHP classes.

## Next steps

* [Registry & Codegen](/neuronai-studio/tools/registry-and-codegen.md)
* [Export & Production](/neuronai-studio/workflows/export-and-production.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://vibemx.gitbook.io/neuronai-studio/tools/make-tool-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
