---
title: "Set a chat tool setting"
method: PUT
path: "/chats/{chat_id}/tools/{tool_id}"
tags: ["Chat"]
---

# Set a chat tool setting

`PUT /chats/{chat_id}/tools/{tool_id}`

## Request

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

Enable or disable a tool for a chat, creating the setting if needed.

## Path parameters

- `chat_id` integer, required
- `tool_id` integer, required: ID of the tool to configure.

## Query parameters

- `cookie_name` string, nullable

## Request body

- ChatToolSettingsUpdate: Request schema for updating a single chat tool setting
  - `enabled` boolean, required: Whether the tool is enabled for the chat.

## Response `200`

Successful Response

- ChatToolSettingsOut: Response schema for chat tool settings
  - `chat_id` integer, required: ID of the chat.
  - `tool_id` integer, required: ID of the tool.
  - `enabled` boolean, required: Whether the tool is enabled for the chat.
  - `created_at` string, date-time, required: When the setting was created.
  - `updated_at` string, date-time, nullable, required: When the setting was last updated, or null if never.

## Other responses

- `401`: Missing or invalid authentication.
- `403`: No access to the chat, or the tool is not enabled for the tenant.
- `404`: Chat, tool, or owning user 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)
