# Aangepaste ai-tool mislukt

**URL:** https://meta.discourse.org/t/custom-ai-tool-fails/315607
**Category:** Bug
**Tags:** ai, ai-bot, fixed
**Created:** [9 juli 2024 om 15:47 UTC](https://meta.discourse.org/t/custom-ai-tool-fails/315607 "2024-07-09T15:47:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![erphyx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erphyx/32/178715_2.png) [@erphyx](https://meta.discourse.org/u/erphyx)
#### Post date: [9 juli 2024 om 15:47 UTC](https://meta.discourse.org/t/custom-ai-tool-fails/315607/1 "2024-07-09T15:47:37Z")

</div>

Symptom:  
Any custom tool having at least one parameter fails with the following:

```json
Job exception: {
  "error": {
    "message": "Invalid schema for function 'custom-geocode': False is not of type 'array'.",
    "type": "invalid_request_error",
    "param": "tools[2].function.parameters",
    "code": "invalid_function_parameters"
  }
}

```

Tools created from presets do not exhibit this.  
I pulled the table contents for ai\_tools, and the tools created from scratch have an “enum”:false property while the preset ones do not have this. I think enum is supposed to be either an array or not be present, but not a bool, hence the error.  
Someone else also already reported this:  
[https://meta.discourse.org/t/discourse-ai-bot-custom-tool-guide/314103/2?u=erphyx](https://meta.discourse.org/t/discourse-ai-bot-custom-tool-guide/314103/2)

Thanks for looking into this 🙂

---

<div class="post-metadata">

### Author: ![Roman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roman/32/157504_2.png) [@Roman](https://meta.discourse.org/u/Roman)
#### Post date: [16 juli 2024 om 17:24 UTC](https://meta.discourse.org/t/custom-ai-tool-fails/315607/3 "2024-07-16T17:24:27Z")

</div>

Apologies for the delay. We just fixed this:

[https://github.com/discourse/discourse-ai/pull/718](https://github.com/discourse/discourse-ai/pull/718)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [17 juli 2024 om 07:09 UTC](https://meta.discourse.org/t/custom-ai-tool-fails/315607/4 "2024-07-17T07:09:03Z")

</div>


