From a4d4c9d2b1432b3daa52c35971b50d2ac51825e4 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 5 Jun 2025 23:25:51 +0000 Subject: [PATCH 1/4] Always use the failures-only reporter for testing The default reporter has verbose output which is not useful but eats up a lot of input tokens once it's in the history. Always run tests with `--reporter=failures-only` to reduce the output size. This output format still includes a count of passing tests. --- pkgs/dart_mcp_server/lib/src/mixins/dash_cli.dart | 2 +- pkgs/dart_mcp_server/test/tools/dart_cli_test.dart | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/dart_mcp_server/lib/src/mixins/dash_cli.dart b/pkgs/dart_mcp_server/lib/src/mixins/dash_cli.dart index be32e73b..a6f8bfc8 100644 --- a/pkgs/dart_mcp_server/lib/src/mixins/dash_cli.dart +++ b/pkgs/dart_mcp_server/lib/src/mixins/dash_cli.dart @@ -68,7 +68,7 @@ base mixin DashCliSupport on ToolsSupport, LoggingSupport, RootsTrackingSupport Future _runTests(CallToolRequest request) async { return runCommandInRoots( request, - arguments: ['test'], + arguments: ['test', '--reporter=failures-only'], commandDescription: 'dart|flutter test', processManager: processManager, knownRoots: await roots, diff --git a/pkgs/dart_mcp_server/test/tools/dart_cli_test.dart b/pkgs/dart_mcp_server/test/tools/dart_cli_test.dart index 26697d61..d516ad53 100644 --- a/pkgs/dart_mcp_server/test/tools/dart_cli_test.dart +++ b/pkgs/dart_mcp_server/test/tools/dart_cli_test.dart @@ -166,13 +166,19 @@ dependencies: command: [ endsWith(flutterExecutableName), 'test', + '--reporter=failures-only', 'foo_test.dart', 'bar_test.dart', ], workingDirectory: exampleFlutterAppRoot.path, )), equalsCommand(( - command: [endsWith(dartExecutableName), 'test', 'zip_test.dart'], + command: [ + endsWith(dartExecutableName), + 'test', + '--reporter=failures-only', + 'zip_test.dart', + ], workingDirectory: dartCliAppRoot.path, )), ]); From 38a8b2174d8444ce577f620a1edbef86712ccd29 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 5 Jun 2025 23:40:50 +0000 Subject: [PATCH 2/4] Bump version There's no audience for this, and the version doesn't matter for packages not published to pub... Satisfy the health check. --- pkgs/dart_mcp_server/CHANGELOG.md | 6 +++++- pkgs/dart_mcp_server/pubspec.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/dart_mcp_server/CHANGELOG.md b/pkgs/dart_mcp_server/CHANGELOG.md index 410389ec..8aaac844 100644 --- a/pkgs/dart_mcp_server/CHANGELOG.md +++ b/pkgs/dart_mcp_server/CHANGELOG.md @@ -1,4 +1,8 @@ -# Version 0.1.0 (Dart SDK 3.8.0) +# 0.1.1-wip + +* Reduce output size of `run_tests` tool to save on input tokens. + +# 0.1.0 (Dart SDK 3.8.0) * Handle relative paths under roots without trailing slashes. * Fix executable paths for dart/flutter on windows. diff --git a/pkgs/dart_mcp_server/pubspec.yaml b/pkgs/dart_mcp_server/pubspec.yaml index 93b9edbc..aa201546 100644 --- a/pkgs/dart_mcp_server/pubspec.yaml +++ b/pkgs/dart_mcp_server/pubspec.yaml @@ -1,5 +1,5 @@ name: dart_mcp_server -version: 0.1.0 +version: 0.1.1-wip description: >- An MCP server for Dart projects, exposing various developer tools to AI models. From baae6fe51b113efa6cf3d5875f5252946fa1d6ed Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 6 Jun 2025 18:07:26 +0000 Subject: [PATCH 3/4] Collapse changelog to single version --- pkgs/dart_mcp_server/CHANGELOG.md | 9 +++------ pkgs/dart_mcp_server/pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/dart_mcp_server/CHANGELOG.md b/pkgs/dart_mcp_server/CHANGELOG.md index 2146458f..b2518c02 100644 --- a/pkgs/dart_mcp_server/CHANGELOG.md +++ b/pkgs/dart_mcp_server/CHANGELOG.md @@ -1,9 +1,4 @@ -# 0.1.1-wip - -* Instruct clients to prefer MCP tools over running tools in the shell. -* Reduce output size of `run_tests` tool to save on input tokens. - -# 0.1.0 (Dart SDK 3.8.0) +# 0.1.0-wip (Dart SDK 3.8.0) * Handle relative paths under roots without trailing slashes. * Fix executable paths for dart/flutter on windows. @@ -41,3 +36,5 @@ * Add a hot reload tool. * Add basic analysis support. * Add the beginnings of a Dart tooling MCP server. +* Instruct clients to prefer MCP tools over running tools in the shell. +* Reduce output size of `run_tests` tool to save on input tokens. diff --git a/pkgs/dart_mcp_server/pubspec.yaml b/pkgs/dart_mcp_server/pubspec.yaml index aa201546..d27c0e10 100644 --- a/pkgs/dart_mcp_server/pubspec.yaml +++ b/pkgs/dart_mcp_server/pubspec.yaml @@ -1,5 +1,5 @@ name: dart_mcp_server -version: 0.1.1-wip +version: 0.1.0-wip description: >- An MCP server for Dart projects, exposing various developer tools to AI models. From 7dcee9643342afa63083233d3e35c472080be7e6 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 6 Jun 2025 19:37:54 +0000 Subject: [PATCH 4/4] Drop version Title the changelog based on the intended SDK version. Leave a WIP marker for clarity on future edits which may be cleaned up before published but is not a risk if retained. --- pkgs/dart_mcp_server/CHANGELOG.md | 2 +- pkgs/dart_mcp_server/pubspec.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/dart_mcp_server/CHANGELOG.md b/pkgs/dart_mcp_server/CHANGELOG.md index b2518c02..fdffc6c4 100644 --- a/pkgs/dart_mcp_server/CHANGELOG.md +++ b/pkgs/dart_mcp_server/CHANGELOG.md @@ -1,4 +1,4 @@ -# 0.1.0-wip (Dart SDK 3.8.0) +# Dart SDK 3.8.0 - WP * Handle relative paths under roots without trailing slashes. * Fix executable paths for dart/flutter on windows. diff --git a/pkgs/dart_mcp_server/pubspec.yaml b/pkgs/dart_mcp_server/pubspec.yaml index d27c0e10..b560d110 100644 --- a/pkgs/dart_mcp_server/pubspec.yaml +++ b/pkgs/dart_mcp_server/pubspec.yaml @@ -1,5 +1,4 @@ name: dart_mcp_server -version: 0.1.0-wip description: >- An MCP server for Dart projects, exposing various developer tools to AI models.