unity-mcp/MCPForUnity/Editor
dsarno b0f7a80df0
Codex/optimize and paginate read console tool (#511)
* Optimize read_console defaults and paging

* Fix read_console truncate test expectations

* Reduce read_console default count from 50 to 10

Further optimize token usage by reducing the default count from 50 to 10 entries. Even 10-20 messages with stack traces can be token-heavy. Added tests for default behavior and paging functionality. Updated tool description to document defaults and paging support.

* Fix ReadConsoleTests to include log type messages

The default types filter changed to ['error', 'warning'] (excluding 'log'), so tests using Debug.Log() need to explicitly request log messages. Also added format='detailed' to HandleCommand_Get_Works test since it accesses structured message fields.

* Address CodeRabbit review feedback

- Fix property naming consistency: next_cursor -> nextCursor (C# camelCase)
- Remove redundant EndGettingEntries call from catch block (already in finally)
- Extract stacktrace stripping to helper function (reduce duplication)
- Fix test mock to match actual C# response structure (items, nextCursor, truncated, total)

* perf: add early exit optimization for ReadConsole paging

- Add early exit in paging loop once page is filled, avoiding iteration
  through remaining console entries (total becomes 'at least N')
- Prefix unused mock arguments with underscores in test_read_console_truncate.py
  to suppress Ruff linter warnings

* refactor: give pageSize independent default, clarify count semantics

- Change pageSize resolution from 'pageSize ?? count ?? 50' to 'pageSize ?? 50'
  so pageSize has its own default independent of count
- count now only serves as the non-paging limit
- Add XML docs to GetConsoleEntries with clear parameter descriptions
- Update Python tool annotations to document pageSize default (50) and
  clarify that count is ignored when paging
2026-01-04 14:46:52 -08:00
..
Clients .Meta file for CherryStudio 2026-01-04 12:38:40 -05:00
Constants HTTP setup overhaul: transport selection (HTTP local/remote vs stdio), safer lifecycle, cleaner UI, better Claude Code integration (#499) 2026-01-01 17:08:51 -08:00
Dependencies Update GUID in Models.meta file 2026-01-02 11:10:03 -05:00
External Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Helpers Payload-safe paging for hierarchy/components + safer asset search + docs (#490) 2025-12-28 20:57:57 -08:00
MenuItems Edit editor configs (#493) 2025-12-29 13:40:50 -04:00
Migrations Improve legacy configuration migration error handling and cleanup (#470) 2025-12-19 18:30:42 -04:00
Models Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
Resources Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
Services Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
Setup Remove distribution settings scriptable object (#473) 2025-12-19 19:11:54 -04:00
Tools Codex/optimize and paginate read console tool (#511) 2026-01-04 14:46:52 -08:00
Windows Async Test Infrastructure & Editor Readiness Status + new refresh_unity tool (#507) 2026-01-03 12:42:32 -08:00
AssemblyInfo.cs Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
AssemblyInfo.cs.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Clients.meta Simplify MCP client configs (#401) 2025-11-27 18:18:44 -04:00
Constants.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Dependencies.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
External.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Helpers.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
MCPForUnity.Editor.asmdef HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
MCPForUnity.Editor.asmdef.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
McpCiBoot.cs Unity MCP CI Test Improvements (#452) 2025-12-10 14:54:55 -08:00
McpCiBoot.cs.meta Add .meta files (#472) 2025-12-19 18:59:19 -04:00
MenuItems.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Migrations.meta HTTP Server, uvx, C# only custom tools (#375) 2025-11-24 23:21:06 -04:00
Models.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Resources.meta Add testing and move menu items to resources (#316) 2025-10-13 11:16:43 -04:00
Services.meta New UI and work without MCP server embedded (#313) 2025-10-11 03:08:16 -04:00
Setup.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Tools.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00
Windows.meta Rename plugin folder to MCPForUnity (#303) 2025-10-03 20:23:28 -04:00