# Delete tool

> DELETE https://api.nabrah.ai/api/ext/tool/{tool_id}

Group: Tools. Page: https://www.nabrah.ai/en/docs/api-reference/tools/delete-tool

Permanently delete a tool from the current project. This removes the tool definition itself; any agent links that reference it are removed along with it, so agents will no longer be able to call it. The operation is identified by the tool_id path parameter and authenticated with your API key.

## Authorization

- `X-API-Key` (string, header, required): your workspace API key.

## Path parameters

- `tool_id` (string, required): The ID of the tool to delete. Obtain it from GET /api/ext/tool (the id field) or from the response of POST /api/ext/tool when the tool was created.

## Response

### 200 Successful Response

Content type: `application/json`

### 422 Validation Error

Content type: `application/json`

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}
```

## Request examples

### cURL

```bash
curl --request DELETE \
  --url 'https://api.nabrah.ai/api/ext/tool/<tool_id>' \
  --header 'X-API-Key: <your-api-key>'
```

### Python

```python
import requests

url = "https://api.nabrah.ai/api/ext/tool/<tool_id>"
headers = {"X-API-Key": "<your-api-key>"}

response = requests.delete(url, headers=headers)
response.raise_for_status()
print(response.json())
```

### JavaScript

```javascript
const response = await fetch("https://api.nabrah.ai/api/ext/tool/<tool_id>", {
  method: "DELETE",
  headers: { "X-API-Key": "<your-api-key>" },
});

const data = await response.json();
console.log(data);
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://api.nabrah.ai/api/ext/tool/<tool_id>", nil)
	req.Header.Set("X-API-Key", "<your-api-key>")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
```
