API Tools AI Bug

Hello!

Whenever I try to use the AI on the right side of the screen to help make an API tool, it returns this error message:

:warning: Could not finish work due to an internal error.
Error: Invalid schema for tool appsheet_database_api_tool at CustomApiTool.getBaseParams (/usr/src/app/Backend/Agent/build/agent/tools/ConfigurableTool.js:80:27) at CustomApiTool.getParams (/usr/src/app/Backend/Agent/build/agent/tools/ConfigurableTool.js:63:33) at CustomApiTool.toGptTool (/usr/src/app/Backend/Agent/build/agent/tools/ConfigurableTool.js:58:34) at ToolBuilderLogic.getWrappedModuleTools (/usr/src/app/Backend/Agent/build/agent/logic/DefaultAgentLogic.js:152:41) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Promise.all (index 9) at async ToolBuilderLogic.getModuleTools (/usr/src/app/Backend/Agent/build/agent/logic/DefaultAgentLogic.js:143:26) at async Promise.all (index 1) at async ToolBuilderLogic.getTools (/usr/src/app/Backend/Agent/build/agent/logic/DefaultAgentLogic.js:88:48) at async ToolBuilderLogic.getToolInstructions (/usr/src/app/Backend/Agent/build/agent/logic/DefaultAgentLogic.js:72:28)

Link to the Thunk AI Tools section for the Thunk Team: Thunk

I don’t need any immediate action or help with this, just thought I would report on it here.

Thanks!

Hi @Travis_Frick thanks for reporting. I see the bug.

Here’s what’s going on, in case you’re interested.

Your custom tool is missing its input schema definition (which defines what inputs it takes when the agent runs it).

This is having two bad effects:

  • The tool isn’t actually callable
  • Worse - it’s blocking your agent from doing any useful work there because it ends up sending an invalid request to the LLM

I will fix this and report back to you. What I’m thinking is:

  • Having an invalid tool shouldn’t cause everything to break :sweat_smile:
  • We should ensure that the tool gets a valid input schema when created/edited (not sure how it happened here, but we could catch it earlier)
  • Your agent should be able to fix the tool (I saw your attempts at this in the chat, but the above problem is preventing it from working)

Awesome, thank you! I just found out this error also causes an entire workflow to stop working, if it attempts to call the API tool, which is not great! I disabled the step’s access to this tool to fix this issue.

@Travis_Frick The fix has been deployed. Having an invalid tool schema will not block the agent’s work anymore.

PS: We’re going to be making this part of the product far easier to use soon.