> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.lumenia.net/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.lumenia.net/_mcp/server.

# Update tool

PATCH https://app.lumenia.net/api/v1/tools/{toolId}
Content-Type: application/json

Update selected tool fields.

Reference: https://docs.lumenia.net/api-reference/tools/update-tool

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <API_KEY>`, where `API_KEY` is your API key.

## Request

### Path parameters

- `toolId` (string, required) — Tool to update.

### Headers

- `X-Account-Id` (string, optional) — Send this to address an organization tool. Omit it to address a partner tool.

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional) — The tool name the assistant calls it by. Must be unique within the scope that owns the tool.
- `description` (string, optional) — Natural-language description of what the tool does. This is what the assistant uses to decide when to call it, so make it specific.
- `method` (enum, optional) — HTTP method the tool uses to call its endpoint.
  - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
- `url` (string, optional) — The endpoint the tool calls.
- `headers` (V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaHeaders, optional) — HTTP headers sent with the request, JSON-Schema-shaped: a type plus properties keyed by header name, each header being a type and value. Values are masked when the tool is read back. Sending this replaces the existing headers.
- `requestSchema` (V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaRequestSchema, optional, nullable) — JSON Schema of the payload the tool sends. Defines the arguments the assistant must supply when calling the tool.
- `responseSchema` (V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaResponseSchema, optional, nullable) — JSON Schema of response fields to make available. Send null or an empty object to reset it. Omit aliases to leave them unchanged.
- `aliases` (list of V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaAliasesItems, optional) — Variable bindings evaluated over the parsed JSON response, where the response body is the $ root (e.g. $.data.id). Each entry maps a variable key to a Liquid template. Send an empty array to clear all aliases. Independent of responseSchema.

## Response

### 200

The updated tool.

- `tool` (V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaTool, required) — The updated tool.

## Errors

### 400 Bad Request Error

No fields to update, or an invalid tool payload

- `any`

### 403 Forbidden Error

The API key is missing or invalid, or the X-Account-Id (when sent) does not belong to the API key partner.

- `message` (string, optional)

### 404 Not Found Error

No tool with this id exists in the addressed scope (also returned when the id is not a valid uuid).

- `any`

### 409 Conflict Error

The new name already exists, or a referenced tool cannot be renamed.

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaHeaders

HTTP headers sent with the request, JSON-Schema-shaped: a type plus properties keyed by header name, each header being a type and value. Values are masked when the tool is read back. Sending this replaces the existing headers.

### V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaRequestSchema

JSON Schema of the payload the tool sends. Defines the arguments the assistant must supply when calling the tool.

### V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaResponseSchema

JSON Schema of response fields to make available. Send null or an empty object to reset it. Omit aliases to leave them unchanged.

### V1ToolsToolIdPatchRequestBodyContentApplicationJsonSchemaAliasesItems

- `key` (string, optional) — The variable name the bound value is exposed as.
- `value` (string, optional) — Liquid template evaluated over the response body, with the body as the $root (e.g. {{$.answer }}).

### V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaTool

The updated tool.

- `id` (string, optional) — The sole identifier for the tool.
- `name` (string, optional) — The tool name the assistant calls it by.
- `description` (string, optional, nullable) — Human-readable description of what the tool does.
- `method` (string, optional) — HTTP method the tool uses to call its endpoint.
- `url` (string, optional) — The endpoint the tool calls.
- `headers` (V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolHeaders, optional) — HTTP headers sent with the request. Values are masked (shown as ••••••); reveal specific ones with the unmask query parameter on GET.
- `requestSchema` (V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolRequestSchema, optional, nullable) — JSON Schema of the payload the tool sends.
- `responseSchema` (V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolResponseSchema, optional, nullable) — JSON Schema of the fields to extract from the tool response.
- `aliases` (list of V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolAliasesItems, optional) — Variable bindings evaluated over the parsed JSON response, where the response body is the $ root (e.g. $.data.id). Each entry maps a variable key to a Liquid template.
- `createdAt` (string, optional) — ISO 8601 timestamp of when the tool was created.
- `updatedAt` (string, optional) — ISO 8601 timestamp of when the tool was last updated.

### V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolHeaders

HTTP headers sent with the request. Values are masked (shown as ••••••); reveal specific ones with the unmask query parameter on GET.

### V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolRequestSchema

JSON Schema of the payload the tool sends.

### V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolResponseSchema

JSON Schema of the fields to extract from the tool response.

### V1ToolsToolIdPatchResponsesContentApplicationJsonSchemaToolAliasesItems

- `key` (string, optional) — The variable name the bound value is exposed as.
- `value` (string, optional) — Liquid template evaluated over the response body.

## Examples

### Change only the aliases

**Request**

```json
{
  "aliases": [
    {
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    },
    {
      "key": "kb_score",
      "value": "{{ $.confidence }}"
    }
  ]
}
```

**Response**

```json
{
  "tool": {
    "id": "b2c3d4e5-6f70-4a1b-8c2d-3e4f5a6b7c8d",
    "name": "ask_lumenone",
    "description": "Query the knowledge base",
    "method": "POST",
    "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
    "headers": {
      "properties": {
        "Authorization": {
          "type": "string",
          "value": "••••••"
        }
      },
      "type": "object"
    },
    "requestSchema": {
      "properties": {
        "query": {
          "description": "The caller question",
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "responseSchema": {
      "properties": {
        "answer": {
          "description": "Answer to read back to the caller",
          "type": "string"
        }
      },
      "required": [
        "answer"
      ],
      "type": "object"
    },
    "aliases": [
      {
        "key": "kb_answer",
        "value": "{{ $.answer }}"
      },
      {
        "key": "kb_score",
        "value": "{{ $.confidence }}"
      }
    ],
    "createdAt": "2026-06-15T05:24:00.000Z",
    "updatedAt": "2026-06-15T05:24:00.000Z"
  }
}
```

**SDK Code**

```python Change only the aliases
import requests

url = "https://app.lumenia.net/api/v1/tools/toolId"

payload = { "aliases": [
        {
            "key": "kb_answer",
            "value": "{{ $.answer }}"
        },
        {
            "key": "kb_score",
            "value": "{{ $.confidence }}"
        }
    ] }
headers = {
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Change only the aliases
const url = 'https://app.lumenia.net/api/v1/tools/toolId';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json'},
  body: '{"aliases":[{"key":"kb_answer","value":"{{ $.answer }}"},{"key":"kb_score","value":"{{ $.confidence }}"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Change only the aliases
package main

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

func main() {

	url := "https://app.lumenia.net/api/v1/tools/toolId"

	payload := strings.NewReader("{\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    },\n    {\n      \"key\": \"kb_score\",\n      \"value\": \"{{ $.confidence }}\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Change only the aliases
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/tools/toolId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    },\n    {\n      \"key\": \"kb_score\",\n      \"value\": \"{{ $.confidence }}\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Change only the aliases
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://app.lumenia.net/api/v1/tools/toolId")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    },\n    {\n      \"key\": \"kb_score\",\n      \"value\": \"{{ $.confidence }}\"\n    }\n  ]\n}")
  .asString();
```

```php Change only the aliases
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://app.lumenia.net/api/v1/tools/toolId', [
  'body' => '{
  "aliases": [
    {
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    },
    {
      "key": "kb_score",
      "value": "{{ $.confidence }}"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Change only the aliases
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/tools/toolId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    },\n    {\n      \"key\": \"kb_score\",\n      \"value\": \"{{ $.confidence }}\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Change only the aliases
import Foundation

let headers = [
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = ["aliases": [
    [
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    ],
    [
      "key": "kb_score",
      "value": "{{ $.confidence }}"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/tools/toolId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Replace every field

**Request**

```json
{
  "name": "ask_lumenone",
  "description": "Query the knowledge base",
  "method": "POST",
  "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
  "headers": {
    "properties": {
      "Authorization": {
        "type": "string",
        "value": "Bearer SECRET"
      }
    },
    "type": "object"
  },
  "requestSchema": {
    "properties": {
      "query": {
        "description": "The caller question",
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "responseSchema": {
    "properties": {
      "answer": {
        "description": "Answer to read back to the caller",
        "type": "string"
      }
    },
    "required": [
      "answer"
    ],
    "type": "object"
  },
  "aliases": [
    {
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    }
  ]
}
```

**Response**

```json
{
  "tool": {
    "id": "b2c3d4e5-6f70-4a1b-8c2d-3e4f5a6b7c8d",
    "name": "ask_lumenone",
    "description": "Query the knowledge base",
    "method": "POST",
    "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
    "headers": {
      "properties": {
        "Authorization": {
          "type": "string",
          "value": "••••••"
        }
      },
      "type": "object"
    },
    "requestSchema": {
      "properties": {
        "query": {
          "description": "The caller question",
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "responseSchema": {
      "properties": {
        "answer": {
          "description": "Answer to read back to the caller",
          "type": "string"
        }
      },
      "required": [
        "answer"
      ],
      "type": "object"
    },
    "aliases": [
      {
        "key": "kb_answer",
        "value": "{{ $.answer }}"
      },
      {
        "key": "kb_score",
        "value": "{{ $.confidence }}"
      }
    ],
    "createdAt": "2026-06-15T05:24:00.000Z",
    "updatedAt": "2026-06-15T05:24:00.000Z"
  }
}
```

**SDK Code**

```python Replace every field
import requests

url = "https://app.lumenia.net/api/v1/tools/toolId"

payload = {
    "name": "ask_lumenone",
    "description": "Query the knowledge base",
    "method": "POST",
    "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
    "headers": {
        "properties": { "Authorization": {
                "type": "string",
                "value": "Bearer SECRET"
            } },
        "type": "object"
    },
    "requestSchema": {
        "properties": { "query": {
                "description": "The caller question",
                "type": "string"
            } },
        "required": ["query"],
        "type": "object"
    },
    "responseSchema": {
        "properties": { "answer": {
                "description": "Answer to read back to the caller",
                "type": "string"
            } },
        "required": ["answer"],
        "type": "object"
    },
    "aliases": [
        {
            "key": "kb_answer",
            "value": "{{ $.answer }}"
        }
    ]
}
headers = {
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Replace every field
const url = 'https://app.lumenia.net/api/v1/tools/toolId';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json'},
  body: '{"name":"ask_lumenone","description":"Query the knowledge base","method":"POST","url":"https://app.lumenia.tech/api/v1/vapi/ask_lumenone","headers":{"properties":{"Authorization":{"type":"string","value":"Bearer SECRET"}},"type":"object"},"requestSchema":{"properties":{"query":{"description":"The caller question","type":"string"}},"required":["query"],"type":"object"},"responseSchema":{"properties":{"answer":{"description":"Answer to read back to the caller","type":"string"}},"required":["answer"],"type":"object"},"aliases":[{"key":"kb_answer","value":"{{ $.answer }}"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Replace every field
package main

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

func main() {

	url := "https://app.lumenia.net/api/v1/tools/toolId"

	payload := strings.NewReader("{\n  \"name\": \"ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Replace every field
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/tools/toolId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Replace every field
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://app.lumenia.net/api/v1/tools/toolId")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}")
  .asString();
```

```php Replace every field
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://app.lumenia.net/api/v1/tools/toolId', [
  'body' => '{
  "name": "ask_lumenone",
  "description": "Query the knowledge base",
  "method": "POST",
  "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
  "headers": {
    "properties": {
      "Authorization": {
        "type": "string",
        "value": "Bearer SECRET"
      }
    },
    "type": "object"
  },
  "requestSchema": {
    "properties": {
      "query": {
        "description": "The caller question",
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "responseSchema": {
    "properties": {
      "answer": {
        "description": "Answer to read back to the caller",
        "type": "string"
      }
    },
    "required": [
      "answer"
    ],
    "type": "object"
  },
  "aliases": [
    {
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Replace every field
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/tools/toolId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"ask_lumenone\",\n  \"description\": \"Query the knowledge base\",\n  \"method\": \"POST\",\n  \"url\": \"https://app.lumenia.tech/api/v1/vapi/ask_lumenone\",\n  \"headers\": {\n    \"properties\": {\n      \"Authorization\": {\n        \"type\": \"string\",\n        \"value\": \"Bearer SECRET\"\n      }\n    },\n    \"type\": \"object\"\n  },\n  \"requestSchema\": {\n    \"properties\": {\n      \"query\": {\n        \"description\": \"The caller question\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"query\"\n    ],\n    \"type\": \"object\"\n  },\n  \"responseSchema\": {\n    \"properties\": {\n      \"answer\": {\n        \"description\": \"Answer to read back to the caller\",\n        \"type\": \"string\"\n      }\n    },\n    \"required\": [\n      \"answer\"\n    ],\n    \"type\": \"object\"\n  },\n  \"aliases\": [\n    {\n      \"key\": \"kb_answer\",\n      \"value\": \"{{ $.answer }}\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Replace every field
import Foundation

let headers = [
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "ask_lumenone",
  "description": "Query the knowledge base",
  "method": "POST",
  "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
  "headers": [
    "properties": ["Authorization": [
        "type": "string",
        "value": "Bearer SECRET"
      ]],
    "type": "object"
  ],
  "requestSchema": [
    "properties": ["query": [
        "description": "The caller question",
        "type": "string"
      ]],
    "required": ["query"],
    "type": "object"
  ],
  "responseSchema": [
    "properties": ["answer": [
        "description": "Answer to read back to the caller",
        "type": "string"
      ]],
    "required": ["answer"],
    "type": "object"
  ],
  "aliases": [
    [
      "key": "kb_answer",
      "value": "{{ $.answer }}"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/tools/toolId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Clear the request schema, response schema and aliases

**Request**

```json
{
  "aliases": []
}
```

**Response**

```json
{
  "tool": {
    "id": "b2c3d4e5-6f70-4a1b-8c2d-3e4f5a6b7c8d",
    "name": "ask_lumenone",
    "description": "Query the knowledge base",
    "method": "POST",
    "url": "https://app.lumenia.tech/api/v1/vapi/ask_lumenone",
    "headers": {
      "properties": {
        "Authorization": {
          "type": "string",
          "value": "••••••"
        }
      },
      "type": "object"
    },
    "requestSchema": {
      "properties": {
        "query": {
          "description": "The caller question",
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    },
    "responseSchema": {
      "properties": {
        "answer": {
          "description": "Answer to read back to the caller",
          "type": "string"
        }
      },
      "required": [
        "answer"
      ],
      "type": "object"
    },
    "aliases": [
      {
        "key": "kb_answer",
        "value": "{{ $.answer }}"
      },
      {
        "key": "kb_score",
        "value": "{{ $.confidence }}"
      }
    ],
    "createdAt": "2026-06-15T05:24:00.000Z",
    "updatedAt": "2026-06-15T05:24:00.000Z"
  }
}
```

**SDK Code**

```python Clear the request schema, response schema and aliases
import requests

url = "https://app.lumenia.net/api/v1/tools/toolId"

payload = { "aliases": [] }
headers = {
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript Clear the request schema, response schema and aliases
const url = 'https://app.lumenia.net/api/v1/tools/toolId';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json'},
  body: '{"aliases":[]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Clear the request schema, response schema and aliases
package main

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

func main() {

	url := "https://app.lumenia.net/api/v1/tools/toolId"

	payload := strings.NewReader("{\n  \"aliases\": []\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <API_KEY>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Clear the request schema, response schema and aliases
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/tools/toolId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <API_KEY>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"aliases\": []\n}"

response = http.request(request)
puts response.read_body
```

```java Clear the request schema, response schema and aliases
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://app.lumenia.net/api/v1/tools/toolId")
  .header("Authorization", "Bearer <API_KEY>")
  .header("Content-Type", "application/json")
  .body("{\n  \"aliases\": []\n}")
  .asString();
```

```php Clear the request schema, response schema and aliases
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://app.lumenia.net/api/v1/tools/toolId', [
  'body' => '{
  "aliases": []
}',
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Clear the request schema, response schema and aliases
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/tools/toolId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <API_KEY>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"aliases\": []\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Clear the request schema, response schema and aliases
import Foundation

let headers = [
  "Authorization": "Bearer <API_KEY>",
  "Content-Type": "application/json"
]
let parameters = ["aliases": []] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/tools/toolId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```