"""Standardized tool output helpers.

Every custom tool should return JSON matching:
  {"status": "ok"|"error", "data": <any>, "message": <str>}
"""
import json as _json


def tool_ok(data=None, message: str = "") -> str:
    return _json.dumps({"status": "ok", "data": data, "message": message}, default=str, ensure_ascii=False)


def tool_error(message: str, data=None) -> str:
    return _json.dumps({"status": "error", "data": data, "message": message}, default=str, ensure_ascii=False)
