Letta · Schema
ConditionalToolRule
A ToolRule that conditionally maps to different child tools based on the output.
AIAgentsStateful AgentsMemoryMemGPTContinual LearningMCPMulti-AgentRAGOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| tool_name | string | The name of the tool. Must exist in the database for the user's organization. |
| type | string | |
| prompt_template | object | Optional template string (ignored). |
| default_child | object | The default child tool to be called. If None, any tool can be called. |
| child_output_mapping | object | The output case to check for mapping |
| require_output_mapping | boolean | Whether to throw an error when output doesn't match any case |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/ConditionalToolRule",
"title": "ConditionalToolRule",
"properties": {
"tool_name": {
"type": "string",
"title": "Tool Name",
"description": "The name of the tool. Must exist in the database for the user's organization."
},
"type": {
"type": "string",
"const": "conditional",
"title": "Type",
"default": "conditional"
},
"prompt_template": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Prompt Template",
"description": "Optional template string (ignored)."
},
"default_child": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Default Child",
"description": "The default child tool to be called. If None, any tool can be called."
},
"child_output_mapping": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"title": "Child Output Mapping",
"description": "The output case to check for mapping"
},
"require_output_mapping": {
"type": "boolean",
"title": "Require Output Mapping",
"description": "Whether to throw an error when output doesn't match any case",
"default": false
}
},
"additionalProperties": false,
"type": "object",
"required": [
"tool_name",
"child_output_mapping"
],
"description": "A ToolRule that conditionally maps to different child tools based on the output."
}