> ## 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, a `calendar` for it to book on a calendar connected to the project, or `mcp` for it to call a tool on an MCP server connected to the project. 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`

**--calendar** `object`

Makes this a calendar tool, which Roark runs against a connected calendar: it takes no runtime and no inputs. Omit or null for any other tool; on update, omitting it makes the tool an ordinary one.

**--calendar.calendar-connection-id** `string` *required*

**--calendar.operation** `string` *required*

One of `CHECK_AVAILABILITY`, `BOOK`, `LOOKUP_BOOKING`, `RESCHEDULE`, `CANCEL`, `LIST_BOOKINGS`

**--calendar.appointment-types** `array` *required*

**--calendar.simulate** `switch`

**--calendar.messages** `object`

**--mcp** `object`

Makes this a tool on one of the project's MCP servers: it takes no runtime, no inputs and no calendar, and the description replaces the server's own. On update, omitting it makes the tool an ordinary one.

**--mcp.mcp-server-id** `string` *required*

**--mcp.tool** `string` *required*

The tool as the server names it.

**--mcp.messages** `object`

## Example

```bash theme={"theme":{"light":"everforest-light","dark":"everforest-dark"}}
roark tool create --name <value> --description <value> --runtime.request <value> --calendar.calendar-connection-id <value> --calendar.operation <value> --calendar.appointment-types <value> --mcp.mcp-server-id <value> --mcp.tool <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.