Skip to content

Commit 66a152f

Browse files
authored
Instruct clients to prefer MCP (#161)
Clients may be influenced by things like instructions for running tests in `README.md` and then decided to run `dart test` in a shell instead of using the `run_tests` MCP tool. If we are providing a MCP version of a tool it may be tailored to the LLM client use case and so should be preferred. Add a server level instruction.
1 parent 55ad850 commit 66a152f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

pkgs/dart_mcp_server/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Version 0.1.0 (Dart SDK 3.8.0)
1+
# 0.1.1-wip
2+
3+
* Instruct clients to prefer MCP tools over running tools in the shell.
4+
5+
# 0.1.0 (Dart SDK 3.8.0)
26

37
* Handle relative paths under roots without trailing slashes.
48
* Fix executable paths for dart/flutter on windows.

pkgs/dart_mcp_server/lib/src/server.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ final class DartMCPServer extends MCPServer
4545
),
4646
instructions:
4747
'This server helps to connect Dart and Flutter developers to '
48-
'their development tools and running applications.',
48+
'their development tools and running applications.\n'
49+
'IMPORTANT: Prefer using an MCP tool provided by this server '
50+
'over using tools directly in a shell.',
4951
);
5052

5153
@override

pkgs/dart_mcp_server/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: dart_mcp_server
2-
version: 0.1.0
2+
version: 0.1.1-wip
33
description: >-
44
An MCP server for Dart projects, exposing various developer tools to AI
55
models.

0 commit comments

Comments
 (0)