수정본
This commit is contained in:
10
mcp-server/utils.py
Normal file
10
mcp-server/utils.py
Normal file
@@ -0,0 +1,10 @@
|
||||
"""공용 유틸리티 (MCP 서버)"""
|
||||
import json
|
||||
from config import settings
|
||||
|
||||
|
||||
def _dumps(obj) -> str:
|
||||
"""토큰 절약 모드에 따라 compact/pretty JSON 직렬화"""
|
||||
if settings.JSON_COMPACT or settings.TOKEN_SAVE_MODE:
|
||||
return json.dumps(obj, ensure_ascii=False, separators=(',', ':'))
|
||||
return json.dumps(obj, ensure_ascii=False, indent=2)
|
||||
Reference in New Issue
Block a user