> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roark.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# roark tool create

> Create a tool

Creates a tool and declares its first version. A tool only recorded from calls under the same name is adopted; one already declared returns 409. Give it a `runtime` for a hosted agent to call your endpoint. Header values are returned on read, so keep secrets out of them.

```bash Synopsis theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark tool create [options]
```

> [!NOTE]
>
> Calls `POST /v1/tool`

## Options

**--name** `string` *required*

**--description** `string` *required*

When the agent should use the tool.

**--agent-id** `string`

**--inputs** `array`

**--invocation-criteria** `string`

**--expected-result** `string`

**--runtime** `object`

Omit or null for a tool that is only graded.

**--runtime.request** `object` *required*

**--runtime.changes-data** `switch`

**--runtime.response-fields** `array`

Repeatable.

**--runtime.messages** `object`

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark tool create --name <value> --description <value> --runtime.request <value>
```

Every command also takes the [global options](https://docs.roark.ai/cli-reference/overview.md#global-options) and sets one
of the [exit codes](https://docs.roark.ai/cli-reference/overview.md#exit-codes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.