snowflake.snowpark.mcp.ToolError¶
- exception snowflake.snowpark.mcp.ToolError(message: str, hint: Optional[str] = None)[source]¶
Bases:
ExceptionRaise in a tool to return an error the model can read and act on.
The tool returns
{"error": {"type": "ToolError", "message": ..., "hint": ...}}instead of failing. Use it for expected failures, such as an unknown ID; any other exception makes the tool call fail.- Parameters:
message – What went wrong, written for the model.
hint – Optional suggestion for what to try instead.