Skip to navigation

api-tools

Read, change, and test the API tools of your AI Agent. An API tool calls an endpoint of your API during a conversation. The alias is actions, so adacli acme actions list works the same as adacli acme api-tools list.

Commands

CommandWhat it does
api-tools listLists API tools, one page at a time.
api-tools get <id>Shows one API tool, with its inputs, outputs, and availability rules.
api-tools createCreates an API tool.
api-tools update <id>Changes an API tool, turns it on or off, or replaces its inputs or outputs from a file.
api-tools profile <id>Shows the sampled traffic of an API tool: each response code, its count, and its schemas.
api-tools delete <id>Deletes an API tool.
api-tools test <id>Runs an API tool one time with test inputs.
api-tools inputs add <id> <name>Adds an input.
api-tools inputs set <id> <name>Changes an input.
api-tools inputs remove <id> <name>Removes an input.
api-tools outputs set <id> <name>Creates or changes an output.
api-tools outputs remove <id> <name>Removes an output.
api-tools headers set <id> <name> <value>Creates or changes a request header.
api-tools headers unset <id> <name>Removes a request header.

Examples

Create an API tool that gets the status of an order:

adacli acme api-tools create --name "Check order status" --method GET \
--url "https://api.example.com/orders/{{order_id}}" --description "Look up the status of an order"

Add the order_id input that the URL uses, and an output that the AI Agent can read. The output key is a JMESPath expression on the response body:

adacli acme api-tools inputs add <action-id> order_id --type text --description "The order to look up"
adacli acme api-tools outputs set <action-id> order_status --key "status" --visible-to-llm true

Add a request header:

adacli acme api-tools headers set <action-id> Accept application/json

Run the API tool with a test value:

adacli acme api-tools test <action-id> --inputs '{"order_id": "1234"}'

Turn off an API tool:

adacli acme api-tools update <action-id> --disable

Details

  • test sends the real HTTP request to your endpoint.
  • inputs add fails if an input with the name exists. inputs set fails if no input has the name.
  • An input type is text, number, boolean, list, or dict.
  • An output --key is a JMESPath expression. An output with --source status_code must have the name http_status_code.
  • headers set and headers unset match the header name without regard to case.
  • update --inputs-file and update --outputs-file replace the full list of inputs or outputs.
  • update --simulation-mode mock mocks the calls of the API tool in a simulation. live sends them for real.

For every option of a command, run it with --help, for example adacli acme api-tools update --help.

  • code-tools: transform the response of an API tool with Python.
  • mcp-tools: connect tools that live on your MCP server.
  • playbooks: run an API tool from a Playbook step.