Skip to content

API Reference parrot_tools.shell_tool.models

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.shell_tool.models

View source

Alias AbstractToolArgsSchema

Re-exported from parrot_tools.abstract.AbstractToolArgsSchema.

Class ActionResult

Result of a shell action execution.

Parameter Type Default Description
ok bool
exit_code Optional[int]
stdout str
stderr str
started_at float
ended_at float
duration float
cmd str
work_dir str
timed_out bool False
metadata Dict[str, Any] dict()
type str 'command'

Fields:

Field Type Default Description
ok bool
exit_code Optional[int]
stdout str
stderr str
started_at float
ended_at float
duration float
cmd str
work_dir str
timed_out bool False
metadata Dict[str, Any] field(default_factory=dict)
type str 'command'

Class BaseAction

Base class for shell and utility actions.

Parameter Type Default Description
type_name str
cmd str ''
work_dir Optional[str] None
timeout Optional[int] None
env Optional[Dict[str, str]] None
pty_mode Optional[bool] None
stdin_lines Optional[List[str]] None
non_interactive Optional[bool] None
ignore_errors Optional[bool] None
live_callback None
sanitizer Optional[Any] None

Method BaseAction.run

run() -> ActionResult

Returns: ActionResult

Class CommandObject

Represents a shell command to be executed.

Fields:

Field Type Default Description
command str The command string to execute, e.g. 'git status'
timeout Optional[int] Timeout in seconds for this command
work_dir Optional[str] Working directory for this command
env Optional[Dict[str, str]] None Extra environment variables
pty Optional[bool] None Force PTY for this command (overrides tool-level)
stdin Optional[List[str]] None Lines to feed to stdin/PTY (each line ends with \n)
non_interactive Optional[bool] None If true, do not wait for interactive prompts
ignore_errors Optional[bool] None If true, do not stop pipeline on failure

Class PlanStep

Represents a step in a shell command plan.

Fields:

Field Type Default Description
type str Action type
uses Optional[str] Reference to previous output
template Optional[str] A Jinja-lite string to render with context
command Optional[Union[str, List[Union[str, CommandObject]]]] None
path Optional[str] None
max_bytes Optional[int] None
eval_type Optional[str] regex | jsonpath | jq
expr Optional[str] Pattern or path for evaluation
group Optional[Union[int, str]] Regex group to extract
as_json bool Try loading uses/template as JSON for jsonpath/jq
timeout Optional[int] None
work_dir Optional[str] None
env Optional[Dict[str, str]] None
pty Optional[bool] None
stdin Optional[List[str]] None
non_interactive Optional[bool] None
ignore_errors Optional[bool] None
content Optional[str] None
encoding Optional[str] 'utf-8'
append Optional[bool] False
overwrite Optional[bool] True
dest Optional[str] None
recursive Optional[bool] False
missing_ok Optional[bool] True
make_dirs Optional[bool] True

Class ShellToolArgs

Arguments for the ShellTool.

Attributes:

Attribute Type Description
command Union[str, List[Union[str, CommandObject]]]
plan Optional[List[PlanStep]]
parallel bool
ignore_errors bool
timeout Optional[int]
work_dir Optional[str]
pty bool
env Optional[Dict[str, str]]
non_interactive bool

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally