Tool

Create a tool in your project.

post/v1/tools

Request

  • Base URL
    https://api.riza.io
  • Auth
    HTTP bearer

Request body

codestring required

The code of the tool. You must define a function named "execute" that takes in a single argument and returns a JSON-serializable value. The argument will be the "input" passed when executing the tool, and will match the input schema.

descriptionstring

A description of the tool.

input_schemaunknown
language'python' | 'javascript' | 'typescript' required

The language of the tool's code.

namestring required

The name of the tool.

runtime_revision_idstring

The ID of the runtime revision to use when executing the tool.

Response

OK

codestring required

The code of the tool. You must define a function named "execute" that takes in a single argument and returns a JSON-serializable value. The argument will be the "input" passed when executing the tool, and will match the input schema.

descriptionstring required

A description of the tool.

idstring required

The ID of the tool.

input_schemaunknown required
language'python' | 'javascript' | 'typescript' required

The language of the tool's code.

namestring required

The name of the tool.

revision_idstring required

The ID of the tool's current revision. This is used to pin executions to a specific version of the tool, even if the tool is updated later.

runtime_revision_idstring

The ID of the custom runtime revision that the tool uses for executions. This pins executions to specific version of a custom runtime runtime, even if the runtime is updated later.

Changes

    • breaking

      the response's property format changed from int32 to no format for status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • breaking

      the request property became required

    • breaking

      removed the enum value JAVASCRIPT of the request property

    • breaking

      removed the enum value PYTHON of the request property

    • breaking

      removed the enum value TYPESCRIPT of the request property

    • warning

      added the new javascript enum value to the response property for the response status

    • warning

      added the new python enum value to the response property for the response status

    • warning

      added the new typescript enum value to the response property for the response status

    • info

      added the new javascript enum value to the request property

    • info

      added the new python enum value to the request property

    • info

      added the new typescript enum value to the request property

    • info

      removed the JAVASCRIPT enum value from the response property for the response status

    • info

      removed the PYTHON enum value from the response property for the response status

    • info

      removed the TYPESCRIPT enum value from the response property for the response status