flutter_mcp_toolkit_capability_core 4.0.0-dev.1
flutter_mcp_toolkit_capability_core: ^4.0.0-dev.1 copied to clipboard
Core Flutter MCP capability (`fmt`) — VM inspection, interaction, navigation, diagnostics, and hot-reload coordination. Server-side Dart; no Flutter SDK dependency.
flutter_mcp_toolkit_capability_core #
Core MCP capability (fmt) for Flutter MCP Toolkit: VM inspection, UI interaction, navigation, logs, diagnostics, and hot-reload coordination.
Server-side Dart only — no Flutter SDK dependency.
Install #
dependencies:
flutter_mcp_toolkit_capability_core: ^4.0.0-dev.1
flutter_mcp_toolkit_capability_kernel: ^4.0.0-dev.1
flutter_mcp_toolkit_core: ^4.0.0-dev.1
Usage #
import 'package:flutter_mcp_toolkit_capability_core/flutter_mcp_toolkit_capability_core.dart';
final capability = FmtCapability(/* host services */);
Adding tools with @AgentTool (Phase 6c pilot) #
Optional codegen via intentcall_codegen + build_runner. Hand-written
ToolRegistration remains first-class.
- Add deps (
intentcall_codegen,intentcall_core,intentcall_mcp) andbuild_runnerdev_dep (seepubspec.yaml). - Annotate a top-level function returning
Future<AgentResult>:
part 'my_tool.g.dart';
@AgentTool(namespace: 'fmt', name: 'my_tool', description: '...')
Future<AgentResult> fmtMyTool(@AgentParam('...') String arg) async { ... }
- Run
dart run build_runner buildin this package. - Register through the host path:
context.registerTool(
agentCallEntryToToolRegistration(
myToolCallEntry,
mergeInputSchema: (schema) => { /* e.g. connection override */ ...schema },
handler: (args) => runCommand(runner, args, MyCommand(...)),
),
);
Pilot: lib/src/tools/codegen/get_recent_logs_tool.dart → get_recent_logs.
Generated .g.dart uses [getRecentLogsInputSchema]; [registerLogTools] still
merges the same schema at host registration for regen safety.
Additional fmt_* tools via @AgentTool are pilot-only until a second tool
passes low blast-radius review; prefer hand-written ToolRegistration for new
server tools. Operator migration uses hand-written fmt_migrate_agent_entries.
Monorepo development #
pubspec_overrides.yaml resolves sibling packages from local paths (not published).
Pub.dev publishing checklist #
| Requirement | Status |
|---|---|
LICENSE, README.md, CHANGELOG.md |
Included |
Hosted sibling deps in pubspec.yaml |
kernel + core ^4.0.0-dev.1 |
Publish after kernel and core 4.0.0-dev.1 on pub.dev |
Required |
dart pub publish --dry-run |
Run before release |
License #
MIT — see LICENSE.