---
title: "Update assistant tool"
method: PUT
path: "/assistantTool/{tool_id}"
tags: ["Assistant Tools"]
---

# Update assistant tool

`PUT /assistantTool/{tool_id}`

Update an existing assistant tool

## Path parameters

- `tool_id` string, required

## Request body

- UpdateToolRequest
  - `name` string
  - `definition` string — JSON string containing the tool definition
  - `function` string — JavaScript code for the tool execution
  - `icon_url` string

## Response `200`

Tool updated successfully

- GetToolResponse
  - `tool` ToolDetail
    - `_id` string
    - `name` string
    - `icon_url` string
    - `definition` string — JSON string containing the tool definition with parameters and schema
    - `function` string — JavaScript code that executes the tool's logic
    - `user_id` string
    - `type` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `__v` integer

## Other responses

- `400` — Invalid input
- `401` — Unauthorized
- `404` — Tool not found

---

[API](https://skmtc.net/smartly/apis/smartly-ai-apis.md) · [All operations](https://skmtc.net/smartly/apis/smartly-ai-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smartly/smartly-ai-apis/revisions/1e26909d86c9/schema)
