Create a code tool

You can author a code tool in three ways. Write it in the dashboard, describe it over Ada’s MCP Server, or push code through the Platform API. Then add the finished tool to a Playbook step for an AI Agent to run mid-conversation. You can also invoke the tool directly, like an API tool.

Write it in the dashboard

For AI Managers who want to write a small tool without a repository or an AI assistant. The dashboard saves the tool directly. This path has no draft and no change set. A tool goes into production immediately when you save it and make it active.

1

Create a new code tool. On the Tools page, select + Tools. Then select New Code tool.

2

Name and describe the tool. Tell the AI Agent what the tool does and when to use it.

3

Write the Python. Add the code the tool runs. Ada checks the code when you save it, and reports any code the sandbox cannot run.

4

Add inputs, outputs, and environment variables. Define the values the tool accepts and returns. See Inputs, outputs, and environment.

5

Test your code. Open Test your code and run the tool with sample inputs. The run uses the same sandbox, network access, and environment a live run uses, so a snippet that passes here passes in production. The run has no conversation, so it skips variable-backed environment entries and names them in the result. Only owners and admins can run a code tool from the dashboard.

6

Save the tool. Select Save and make active to publish the tool. Select Save as inactive to keep it off until you are ready.

Author over Ada’s MCP Server (describe it)

For AI Managers who want to describe the change in plain language rather than write code. Connect an AI assistant to Ada’s MCP Server and describe the tool; the assistant writes the name, description, inputs, outputs, and code. Authoring routes through a change set: the tool is staged as a draft, you run tests against it, and it goes live only when you promote it. A promote can be reverted.

1

Create an API key. In the dashboard, create an API key for the AI assistant to authenticate with. The key connects the assistant to Ada’s MCP Server and the Platform API.

2

Connect Ada’s MCP Server. In your AI assistant, add Ada’s MCP Server using the API key. This lets the assistant create and update tools on your Agent.

3

Describe the tool. Tell the assistant what the tool should do: the data it works with, the inputs it takes, and the result it returns. Be specific about the output the Agent needs.

4

Review what was generated. Check the name, description, code, inputs, outputs, and environment variables. To change anything, ask for the change in chat rather than hand-editing the code, so the assistant keeps the tool consistent.

5

Test the draft. The tool is staged on a change set, not live. Run your test cases against the draft to confirm it returns what you expect.

6

Promote the change set. When the results look right, promote the change set to make the tool live. A promote can be reverted if you need to roll back.

7

(Optional) Add it to a Playbook step. The tool is live once you promote it. To have the AI Agent run it inside a specific Playbook workflow, add a step that runs the tool. This is recommended but not required: a code tool can also run on its own.

Author through the Platform API (push code)

For developers pushing code that is already written and reviewed, for example from a repository or CI pipeline. A push through the Platform API writes the tool directly: there is no draft or confirmation step. The tool then appears in the dashboard, the same as one authored over MCP.

The Platform API is the programmatic authoring path, for developers who prefer to define a tool in code rather than describe it to an assistant.

After a tool is live

Once a code tool is live, its runs appear in the conversation view: while reviewing a conversation, open any run to see its status, inputs, outputs, and logs. A code tool also runs during a Simulation, but the Simulations view shows only that it ran, not its result. To inspect a run in full, open the conversation. Creating, updating, or deleting a code tool is recorded in the Audit log; its runs are not.

You can edit a live tool’s code from the dashboard, over Ada’s MCP Server, or through the Platform API. See Limits and best practices.