motleycrew.tools.code.postgresql_linter

Functions

create_pgsql_linter_tool()

Classes

PostgreSQLLinterInput(*, query)

Input for the PostgreSQLLinterTool.

PostgreSQLLinterTool([return_direct, ...])

PostgreSQL code verification tool.

class motleycrew.tools.code.postgresql_linter.PostgreSQLLinterTool(return_direct: bool = False, exceptions_to_reflect: List[Exception] | None = None)

Bases: MotleyTool

PostgreSQL code verification tool.

__init__(return_direct: bool = False, exceptions_to_reflect: List[Exception] | None = None)

Initialize the MotleyTool.

Parameters:
  • name – Name of the tool (required if tool is None).

  • description – Description of the tool (required if tool is None).

  • args_schema – Schema of the tool arguments (required if tool is None).

  • tool – Langchain BaseTool to wrap.

  • return_direct – If True, the tool’s output will be returned directly to the user.

  • exceptions_to_reflect – List of exceptions to reflect back to the agent.

  • retry_config – Configuration for retry behavior. If None, exceptions will not be retried.

class motleycrew.tools.code.postgresql_linter.PostgreSQLLinterInput(*, query: str)

Bases: BaseModel

Input for the PostgreSQLLinterTool.

query: str
model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

motleycrew.tools.code.postgresql_linter.create_pgsql_linter_tool() Tool