Skip to content

Commit c3efea9

Browse files
committed
chore: release v0.9.30 — fix Gemini duplicate function declaration, tool limit
1 parent 6d30585 commit c3efea9

19 files changed

Lines changed: 251 additions & 29 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 0.9.30
2+
3+
**Fix Gemini/Vertex AI "Duplicate function declaration" error (issue #32)**
4+
5+
### Changes
6+
- Fix: remove duplicate `get_network_requests` definition — direct root cause of Gemini 400 error
7+
- Fix: limit tools/list to ~11 connection tools before any connection, preventing Gemini 128-tool limit breach
8+
- Add: `connectionOnlyTools` set and `geminiToolLimit` constant in ToolRegistry
9+
- Add: `test/tool_registry_test.dart` — 17 unit tests covering tool filtering behavior
10+
11+
---
12+
113
## 0.9.29
214

315
**Fix: add connect_openclaw_browser and connect_webmcp to tool_registry**

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ Then batch multiple actions in one call:
440440

441441
```yaml
442442
dependencies:
443-
flutter_skill: ^0.9.29
443+
flutter_skill: ^0.9.30
444444
```
445445
446446
```dart

intellij-plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
}
66

77
group = "com.aidashboad"
8-
version = "0.9.29"
8+
version = "0.9.30"
99

1010
repositories {
1111
mavenCentral()

intellij-plugin/src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin>
22
<id>com.aidashboad.flutterskill</id>
33
<name>Flutter Skill - AI App Automation</name>
4-
<version>0.9.29</version>
4+
<version>0.9.30</version>
55
<vendor email="support@ai-dashboad.com" url="https://github.com/ai-dashboad/flutter-skill">ai-dashboad</vendor>
66

77
<description><![CDATA[

lib/src/cli/server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ part 'tool_handlers/bug_report_handlers.dart';
6868
part 'tool_handlers/fixture_handlers.dart';
6969
part 'tool_handlers/explore_handlers.dart';
7070

71-
const String currentVersion = '0.9.29';
71+
const String currentVersion = '0.9.30';
7272

7373
/// Session information for multi-session support
7474
class SessionInfo {

lib/src/engine/tool_registry.dart

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,28 @@ class ToolDefinition {
2121
///
2222
/// Extracted from FlutterMcpServer._getToolsList() — pure data, no logic.
2323
class ToolRegistry {
24+
/// Gemini/Vertex AI maximum tool declarations per request.
25+
static const geminiToolLimit = 128;
26+
27+
/// Tools shown before any connection is established.
28+
///
29+
/// Kept intentionally small (~11) so the total stays under the Gemini
30+
/// 128-function limit even when flutter-skill is combined with other MCP
31+
/// servers (e.g. Dart MCP). All other tools become visible after connecting.
32+
static const connectionOnlyTools = <String>{
33+
'connect_app',
34+
'connect_cdp',
35+
'connect_openclaw_browser',
36+
'connect_webmcp',
37+
'scan_and_connect',
38+
'launch_app',
39+
'list_sessions',
40+
'list_running_apps',
41+
'get_connection_status',
42+
'disconnect',
43+
'diagnose_project',
44+
};
45+
2446
/// CDP-only tools that don't apply to bridge/Flutter platforms.
2547
static const cdpOnlyTools = <String>{
2648
'connect_cdp',
@@ -804,12 +826,6 @@ After starting, point the web SDK at ws://127.0.0.1:<port>.""",
804826
"description": "Get browser console log messages",
805827
"inputSchema": {"type": "object", "properties": {}}
806828
},
807-
{
808-
"name": "get_network_requests",
809-
"description":
810-
"Get all network requests made by the page (via Performance API)",
811-
"inputSchema": {"type": "object", "properties": {}}
812-
},
813829
{
814830
"name": "set_viewport",
815831
"description": "Set browser viewport size (responsive testing)",
@@ -3624,8 +3640,15 @@ can visually compare them. Also returns text snapshots for structural comparison
36243640
});
36253641
}
36263642

3627-
// Smart filtering: when connected, only return relevant tools
3628-
if (!hasConnection) return allTools;
3643+
// Before any connection: only show connection/discovery tools.
3644+
// This keeps the total under the Gemini 128-function-declaration limit
3645+
// when flutter-skill is used alongside other MCP servers (e.g. Dart MCP).
3646+
// All tools become visible after connect_app / connect_cdp / etc.
3647+
if (!hasConnection) {
3648+
return allTools
3649+
.where((t) => connectionOnlyTools.contains(t['name'] as String))
3650+
.toList();
3651+
}
36293652

36303653
return allTools.where((tool) {
36313654
final name = tool['name'] as String;

packaging/homebrew/flutter-skill.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
class FlutterSkill < Formula
22
desc "MCP Server for Flutter app automation - AI Agent control for Flutter apps"
33
homepage "https://github.com/ai-dashboad/flutter-skill"
4-
version "0.9.29"
4+
version "0.9.30"
55
license "MIT"
66

77
# Platform-specific native binaries
88
on_macos do
99
on_arm do
10-
url "https://github.com/ai-dashboad/flutter-skill/releases/download/v0.9.29/flutter-skill-macos-arm64"
10+
url "https://github.com/ai-dashboad/flutter-skill/releases/download/v0.9.30/flutter-skill-macos-arm64"
1111
sha256 "PLACEHOLDER_ARM64_SHA256"
1212
end
1313
on_intel do
14-
url "https://github.com/ai-dashboad/flutter-skill/releases/download/v0.9.29/flutter-skill-macos-x64"
14+
url "https://github.com/ai-dashboad/flutter-skill/releases/download/v0.9.30/flutter-skill-macos-x64"
1515
sha256 "PLACEHOLDER_X64_SHA256"
1616
end
1717
end
1818

1919
on_linux do
20-
url "https://github.com/ai-dashboad/flutter-skill/releases/download/v0.9.29/flutter-skill-linux-x64"
20+
url "https://github.com/ai-dashboad/flutter-skill/releases/download/v0.9.30/flutter-skill-linux-x64"
2121
sha256 "PLACEHOLDER_LINUX_SHA256"
2222
end
2323

@@ -48,7 +48,7 @@ def caveats
4848
Note: Your Flutter app needs to include the flutter_skill package.
4949
Add to pubspec.yaml:
5050
dependencies:
51-
flutter_skill: ^0.9.29
51+
flutter_skill: ^0.9.30
5252
EOS
5353
end
5454

packaging/npm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "flutter-skill",
33
"mcpName": "io.github.ai-dashboad/flutter-skill",
4-
"version": "0.9.29",
4+
"version": "0.9.30",
55
"description": "MCP Server for app automation - Give your AI Agent eyes and hands inside any app (Flutter, React, Web, Native)",
66
"main": "index.js",
77
"bin": {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_skill
22
description: Give your AI Agent eyes and hands inside your Flutter app.
3-
version: 0.9.29
3+
version: 0.9.30
44
homepage: https://github.com/ai-dashboad/flutter-skill
55
repository: https://github.com/ai-dashboad/flutter-skill
66
# publish_to: 'none' # Remove this when ready to publish to pub.dev

sdks/android/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = "com.flutterskill"
7-
version = "0.9.29"
7+
version = "0.9.30"
88

99
android {
1010
namespace = "com.flutterskill"

0 commit comments

Comments
 (0)