Introducing Confident Monitor

Get Tool

(v2)

GET

Retrieves a tool by id, including its input schema. Pass version to retrieve that version instead of the latest.

GET/v2/tools/{toolId}
curl -X GET "https://api.confident-ai.com/v2/tools/{toolId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "<TOOL-ID>",
    "name": "get_customer_name",
    "description": "Looks up the customer's name by id.",
    "mode": "ALLOW_ADDITIONAL",
    "version": "00.00.01",
    "schema": {
      "type": "object",
      "properties": {
        "customerId": {
          "type": "string",
          "description": "The id of the customer to look up."
        },
        "nameFormat": {
          "type": "string",
          "enum": [
            "FULL",
            "FIRST"
          ],
          "description": "Whether to return the full name or only the first name."
        }
      },
      "required": [
        "customerId"
      ]
    }
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • toolIdstringRequired

    The id of the tool.

Query parameters

  • versionstring

    The version to retrieve. Omit it for the latest version.

Response

Get Tool succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A tool your prompts can call. Changing its mode or schema creates a new version.

    Show 6 propertiesHide 6 properties
    • idstring

      The id of the tool, generated by Confident AI.

    • namestring

      The name of the tool, unique within the project.

    • descriptionstring | null

      What the tool does.

    • modeenum

      This is the mode for your tool input fields, which controls whether fields outside the schema are allowed.

      Show 3 enum valuesHide 3 enum values
      • ALLOW_ADDITIONAL
      • NO_ADDITIONAL
      • STRICT
    • versionstring

      The version of the tool. A pulled prompt returns the version its commit pinned.

    • schemaobject

      The JSON Schema for the tool's input. List each parameter under properties with a type, and name the mandatory ones in required. A parameter can also have a description, an enum of allowed values, or items for an array. Whether extra properties are allowed is set by mode.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI