From bf706971892e7c7c5f637179f3e0f2070cfafbf6 Mon Sep 17 00:00:00 2001 From: iVibudh Date: Thu, 21 May 2026 01:20:19 -0600 Subject: [PATCH] fix: MCP humanize tool rendering findings as [object Object] critical and important arrays contain objects, not strings. Format each item with line number, pattern name, flagged text, and suggestion so agent clients receive actionable output. Co-Authored-By: Claude Sonnet 4.6 --- mcp-server/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mcp-server/index.js b/mcp-server/index.js index 69628be..6857f0f 100644 --- a/mcp-server/index.js +++ b/mcp-server/index.js @@ -180,15 +180,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { if (suggestions.critical?.length > 0) { output += `### 🔴 Critical (Dead giveaways)\n`; for (const s of suggestions.critical) { - output += `- ${s}\n`; + output += `- L${s.line}: [${s.pattern}] "${s.text}" → ${s.suggestion}\n`; } output += '\n'; } - + if (suggestions.important?.length > 0) { output += `### 🟠 Important (Noticeable patterns)\n`; for (const s of suggestions.important) { - output += `- ${s}\n`; + output += `- L${s.line}: [${s.pattern}] "${s.text}" → ${s.suggestion}\n`; } output += '\n'; }