flutter-mcp-toolkit-intentcall-migration
About flutter-mcp-toolkit-intentcall-migration
A migration skill for Flutter MCP Toolkit users moving from the removed MCPCallEntry API to AgentCallEntry. It targets app developers upgrading mcp_toolkit and covers CLI previews, rewrites, registration, and handler conventions.
Key features
- 01Check code for pending migrations
- 02Rewrite entry usage automatically
- 03Register entries after migration
- 04Return results with AgentResult
- 05Sync platform code generation
Use cases
- 01Fix undefined MCPCallEntry after an upgrade
- 02Move custom tools to the new API
- 03Check apps before a major mcp_toolkit release
MCP support
It documents the shipped MCP tool fmt_migrate_agent_entries, which reports changes by default and rewrites code with apply: true; an equivalent CLI command is also available.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ arenukvern/ mcp_flutter --skill flutter-mcp-toolkit-intentcall-migrationAfter installing, type/flutter-mcp-toolkit-intentcall-migrationin Claude Code to confirm it loaded.
Details
From the project READMEIntentCall migration — MCPCallEntry → AgentCallEntry
MCPCallEntry is removed from mcp_toolkit. App code must use
AgentCallEntry (from intentcall_core, re-exported by mcp_toolkit).
Canonical migration doc: migration_mcp_call_entry_to_agent_call_entry.md
When to use this skill
dart analyzereports undefinedMCPCallEntryafter upgradingmcp_toolkit- User asks to migrate custom tools/resources to the new API
- Before shipping a major
mcp_toolkitbump to consumers
CLI (preferred)
# Preview (exit 1 if changes pending)
flutter-mcp-toolkit migrate agent-entries --check lib/
# Apply
flutter-mcp-toolkit migrate agent-entries --write lib/
flutter-mcp-toolkit migrate agent-entries --write --namespace my_app lib/main.dart
Alias: migrate mcp-call-entry (same behavior).
After migration — registration
MCPToolkitBinding.addEntries(entries: Set<AgentCallEntry>)addEntries(entries: { ... })beforebootstrapFlutter(runApp: ...)addMcpTool(AgentCallEntry)— still a shortcut for a single entry
Handlers should return AgentResult (AgentResult.success / AgentResult.failure).
For legacy MCPCallResult + MCPToolDefinition handlers, use mcpToolkitTool /
mcpToolkitResource (see flutter-mcp-toolkit-custom-tools).
Legacy pattern (before — do not ship new code)
// BEFORE (removed in Phase 6b)
final tool = MCPCallEntry.tool(
handler: (request) async => MCPCallResult(
message: 'ok',
parameters: {'n': request['n']},
),
definition: MCPToolDefinition(
name: 'my_tool',
description: 'Example',
inputSchema: {'type': 'object', 'properties': {}},
),
);
Target pattern (after)
import 'package:mcp_toolkit/mcp_toolkit.dart';
final tool = AgentCallEntry.tool(
namespace: 'app',
name: 'my_tool',
description: 'Example',
inputSchema: const {
'type': 'object',
'additionalProperties': false,
'properties': {'n': {'type': 'string'}},
'required': ['n'],
},
handler: (final args) async {
final n = args['n']?.toString() ?? '';
return AgentResult.success(
message: 'ok',
data: {'n': n},
);
},
);
await MCPToolkitBinding.instance.addEntries(entries: {tool});
Platform sync (optional)
After tool surfaces compile:
flutter-mcp-toolkit codegen sync --platform web
flutter-mcp-toolkit codegen sync --platform android,ios,macos --check
See docs/platform-notes/android-oem.md for Xiaomi/Huawei (same shortcuts XML as AOSP).
MCP migrate tool
fmt_migrate_agent_entries is shipped (report-only by default; apply: true to
rewrite). CLI equivalent: flutter-mcp-toolkit migrate agent-entries.
Maintainer checklist (in-repo product gate)
flutter-mcp-toolkit migrate agent-entries --checkonshowcase/flutter_test_app/libmake sync-skillsafter anyplugin/skills/editcd mcp_server_dart && dart test test/contract/- Grep: no
MCPCallEntryin skills except this file's BEFORE examples
Hosted IntentCall packages
IntentCall now lives outside this repository. Normal consumer state uses hosted intentcall_* packages.
- Use hosted
intentcall_*: ^0.6.0dependencies for committed consumer state. - Use local path overrides only for deliberate cross-repo development against a local IntentCall checkout.
- Run
flutter pub getandmigrate agent-entries --checkagain after dependency changes. - CI: use
make check-intentcall-hosted-consumerfor hostedmcp_flutterproof; usemake check-intentcall-sibling-matrixonly for deliberate local IntentCall checkout matrix proof. The historicalmake check-intentcall-integrationtarget is a compatibility alias for the sibling-matrix lane, not a fresh-adopter hosted gate.
Related skills
flutter-mcp-toolkit-custom-tools— authoringAgentCallEntrysurfacesflutter-mcp-toolkit-repo-maintainer— CHANGELOG, version pins,sync-skills