Letta · Schema

ToolCreate

AIAgentsStateful AgentsMemoryMemGPTContinual LearningMCPMulti-AgentRAGOpen Source

Properties

Name Type Description
description object The description of the tool.
tags object Metadata tags.
source_code string The source code of the function.
source_type string The source type of the function.
json_schema object The JSON schema of the function (auto-generated from source_code if not provided)
args_json_schema object The args JSON schema of the function.
return_char_limit integer The maximum number of characters in the response.
pip_requirements object Optional list of pip packages required by this tool.
npm_requirements object Optional list of npm packages required by this tool.
default_requires_approval object Whether or not to require approval before executing this tool.
enable_parallel_execution object If set to True, then this tool will potentially be executed concurrently with other tools. Default False.
View JSON Schema on GitHub

JSON Schema

letta-toolcreate-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ToolCreate",
  "title": "ToolCreate",
  "properties": {
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description",
      "description": "The description of the tool."
    },
    "tags": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tags",
      "description": "Metadata tags."
    },
    "source_code": {
      "type": "string",
      "title": "Source Code",
      "description": "The source code of the function."
    },
    "source_type": {
      "type": "string",
      "title": "Source Type",
      "description": "The source type of the function.",
      "default": "python"
    },
    "json_schema": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Json Schema",
      "description": "The JSON schema of the function (auto-generated from source_code if not provided)"
    },
    "args_json_schema": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Args Json Schema",
      "description": "The args JSON schema of the function."
    },
    "return_char_limit": {
      "type": "integer",
      "maximum": 1000000,
      "minimum": 1,
      "title": "Return Char Limit",
      "description": "The maximum number of characters in the response.",
      "default": 50000
    },
    "pip_requirements": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/components/schemas/PipRequirement"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Pip Requirements",
      "description": "Optional list of pip packages required by this tool."
    },
    "npm_requirements": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/components/schemas/NpmRequirement"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Npm Requirements",
      "description": "Optional list of npm packages required by this tool."
    },
    "default_requires_approval": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Default Requires Approval",
      "description": "Whether or not to require approval before executing this tool."
    },
    "enable_parallel_execution": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Enable Parallel Execution",
      "description": "If set to True, then this tool will potentially be executed concurrently with other tools. Default False.",
      "default": false
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "source_code"
  ]
}