StuMason/coolify-mcp
TypeScript
Pull Request Merged
PR #83 merged: fix: deployment logs truncation by character count
Problem
When fetching deployment logs with lines: 50, the API returns 917K+ characters because:
- Coolify API doesn't support
linesparam - we fetch full log and truncate client-side - Our truncation only limited line COUNT, not CHARACTER count
- Docker build logs have giant lines (base64 encoded data, minified code)
Solution
Add character-based truncation as a safety net:
| Behavior | Before | After |
|---|---|---|
| Default lines | Unlimited | Last 200 |
| Character limit | None | 50K (configurable) |
| Truncation indicator | None | ...[truncated]... prefix |
Changes
- Default to last 200 lines when
linesnot specified - Cap at 50K characters regardless of line count
- Add
max_charsparameter for customization - Prepend
...[truncated]...when character limit applied
Test Plan
-
npm test- All 191 tests pass -
npm run build- TypeScript compiles - Manual:
deployment(action: "get", uuid: "...")should return < 100K chars
Closes #82
Stu Mason + AI [email protected]
+111
additions
-11
deletions
3
files changed