orxtra v0.13.0 /tool.src.orxtra.tool._data_tool_types
On this page

Strict pydantic models for data-defined tool TOML: ParamDef, ResourceLimits, the discriminated ExecutionConfig union (HttpExecution/MontyExecution/CommandExecution), OutputConfig, and the top-level DataToolDefinition.

#tool.src.orxtra.tool._data_tool_types

#tool.src.orxtra.tool._data_tool_types

Pydantic models for data-defined tool TOML definitions.

Strict validation: every model uses strict=True, extra='forbid'. The custom. namespace root is enforced at the model level via a field validator. Execution type is discriminated via type.

#ParamDef

A single parameter definition in the [params] table.

#ResourceLimits

Resource limits for the monty execution type.

#HttpExecution

type = "http" execution configuration.

#MontyExecution

type = "monty" execution configuration (pydantic-monty).

#CommandExecution

type = "command" execution configuration.

#_execution_discriminator

python
def _execution_discriminator(v: Any) -> str

Discriminator for execution type union.

#OutputConfig

Output validation configuration.

#DataToolDefinition

Top-level model for a data-defined tool TOML file.

Maps to the structure::

[tool] name = "..." description = "..." namespace = "custom...." deferred = false tags = ["extra_tag"]

[params] [params.query] type = "string" ...

[execution] type = "http" ...

[output] schema = { ... }

Search