---
title: "Add a tool to an assistant"
method: POST
path: "/assistants/{assistant_id}/tools/{tool_id}"
tags: ["Assistant"]
---

# Add a tool to an assistant

`POST /assistants/{assistant_id}/tools/{tool_id}`

## Request

- Base URL: `https://api.your-domain.com`
- URL: `https://api.your-domain.com/assistants/{assistant_id}/tools/{tool_id}`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/docs/assistants/:assistant_id/tools/:tool_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Enable a tenant tool for the assistant.

## Path parameters

- `assistant_id` integer, required
- `tool_id` integer, required: ID of the tool to enable.

## Query parameters

- `cookie_name` string, nullable

## Response `201`

Successful Response

- AssistantTool
  - `created_at` string, date-time: UTC timestamp when the record was created.
  - `updated_at` string, date-time: UTC timestamp when the record was last updated.
  - `assistant_id` integer, required: ID of the assistant the tool is attached to.
  - `tool_id` integer, required: ID of the tool attached to the assistant.

## Other responses

- `401`: Missing or invalid authentication.
- `403`: Not the creator, or the tool is not enabled for the tenant.
- `404`: Assistant, owning user, or tool does not exist.
- `422`: Validation Error

---

[API](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api.md) - [All operations](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/revisions/b53e89b98c2b?raw)
