diff --git a/MCPForUnity/Editor/Helpers/McpLog.cs b/MCPForUnity/Editor/Helpers/McpLog.cs
index ca9f77131..138a2bf26 100644
--- a/MCPForUnity/Editor/Helpers/McpLog.cs
+++ b/MCPForUnity/Editor/Helpers/McpLog.cs
@@ -1,3 +1,4 @@
+using System;
using MCPForUnity.Editor.Constants;
using UnityEditor;
using UnityEngine;
@@ -11,6 +12,15 @@ internal static class McpLog
private const string WarnPrefix = "MCP-FOR-UNITY:";
private const string ErrorPrefix = "MCP-FOR-UNITY:";
+ internal static bool IsMcpLogMessage(string message)
+ {
+ return message.StartsWith(InfoPrefix, StringComparison.Ordinal)
+ || message.StartsWith(DebugPrefix, StringComparison.Ordinal)
+ || message.StartsWith(WarnPrefix, StringComparison.Ordinal)
+ || message.StartsWith(ErrorPrefix, StringComparison.Ordinal)
+ || message.StartsWith("MCP-FOR-UNITY:", StringComparison.Ordinal);
+ }
+
private static volatile bool _debugEnabled = ReadDebugPreference();
private static bool IsDebugEnabled() => _debugEnabled;
diff --git a/MCPForUnity/Editor/Tools/ReadConsole.cs b/MCPForUnity/Editor/Tools/ReadConsole.cs
index b4abb5882..a2ab1ae88 100644
--- a/MCPForUnity/Editor/Tools/ReadConsole.cs
+++ b/MCPForUnity/Editor/Tools/ReadConsole.cs
@@ -192,6 +192,7 @@ public static object HandleCommand(JObject @params)
string filterText = p.Get("filterText");
string format = p.Get("format", "plain").ToLower();
bool includeStacktrace = p.GetBool("includeStacktrace", false);
+ bool includeMcpLogs = p.GetBool("includeMcpLogs", true);
if (types.Contains("all"))
{
@@ -205,7 +206,8 @@ public static object HandleCommand(JObject @params)
cursor,
filterText,
format,
- includeStacktrace
+ includeStacktrace,
+ includeMcpLogs
);
}
else
@@ -349,7 +351,8 @@ private static object GetConsoleEntries(
int? cursor,
string filterText,
string format,
- bool includeStacktrace
+ bool includeStacktrace,
+ bool includeMcpLogs
)
{
List