gitnexus-cli
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
Use this skill when the agent exposes app-specific surfaces by registering custom MCP tools and resources inside the Flutter app (mcp_toolkit dynamic registry — AgentCallEntry, addEntries). Covers tool vs resource vs evaluate-expression, Map-based handlers, schema strictness,
$ npx -y skills add Arenukvern/mcp_flutter --skill flutter-mcp-toolkit-custom-tools --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/flutter-mcp-toolkit-custom-toolsContext preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when the agent exposes app-specific surfaces by registering custom MCP tools and resources inside the Flutter app (mcp_toolkit dynamic registry — AgentCallEntry, addEntries). Covers tool vs resource vs evaluate-expression, Map-based handlers, schema strictness,
name: flutter-mcp-toolkit-custom-tools description: Use this skill when the agent exposes app-specific surfaces by registering custom MCP tools and resources inside the Flutter app (mcp_toolkit dynamic registry — AgentCallEntry, addEntries). Covers tool vs resource vs evaluate-expression, Map-based handlers, schema strictness, discovery via fmt_list_client_tools_and_resources, fmt_client_tool, fmt_client_resource, and lifecycle pitfalls.
<!-- @FMT_MODE_PRELUDE -->
Use this when bundled MCP tools (screenshot, semantic snapshot, tap, …) are not enough and you need **app-specific** read surfaces or actions — e.g. cart totals, feature flags, curated debug snapshots of internal state. Entries are registered **in the Flutter process** and exposed to the agent through the **dynamic registry**.
> **Migration:** The legacy call-entry type was removed in intentcall Phase 6b. Use **`AgentCallEntry`** or **`mcpToolkitTool` / `mcpToolkitResource`**. See **`flutter-mcp-toolkit-intentcall-migration`**.
> **Boundary:** Change app discovery, Flutter VM-service extensions, or > app-owned debug surfaces here. Change canonical registry/session semantics, > schema policy, platform projection, or publish behavior in the upstream > IntentCall repository.
| Need | Use | |------|-----| | One-off read of a simple value | **`fmt_evaluate_dart_expression`** (no app code change). | | Stable **read-only** payload (diagnostics, JSON snapshot, “current route”) | **`AgentCallEntry.resource`** + **`fmt_client_resource`**. Prefer resources when the contract is “GET-like” and idempotent. | | Parameterized or mutating action, or reusable named operation | **`AgentCallEntry.tool`** + **`fmt_client_tool`**. |
Handlers receive **`AgentArguments`** (`Map<String, Object?>`) and return **`AgentResult`**:
import 'package:mcp_toolkit/mcp_toolkit.dart';
final tool = AgentCallEntry.tool(
namespace: 'app',
name: 'cart_get_snapshot',
description: 'Return current cart total and items for a user.',
inputSchema: const {
'type': 'object',
'additionalProperties': false,
'properties': {
'userId': {'type': 'string'},
},
'required': ['userId'],
},
handler: (final args) async {
final userId = args['userId']?.toString() ?? '';
final cart = CartRepository.instance.forUser(userId);
return AgentResult.success(
message: 'ok',
data: {
'total': cart.total,
'items': cart.items.map((final i) => i.toJson()).toList(),
},
);
},
);
await MCPToolkitBinding.instance.addEntries(entries: {tool});Built-in toolkits still use **`mcpToolkitTool`** / **`mcpToolkitResource`** to adapt `Map<String, String>` service-extension handlers:
final tool = mcpToolkitTool(
namespace: 'app',
handler: (final request) async {
final userId = request['userId'] ?? '';
return MCPCallResult(
message: 'ok',
parameters: {'userId': userId},
);
},
definition: MCPToolDefinition(
name: 'cart_get_snapshot',
description: 'Return current cart total and items for a user.',
inputSchema: ObjectSchema(
properties: {
'userId': StringSchema(),
},
required: ['userId'],
),
),
);Prefer **`MCPToolkitBinding.instance.addEntries(entries: { ... })` before `bootstrapFlutter(runApp: ...)`** so tools/resources register in one place with zone/error setup.
Register **once** at bootstrap — not inside `build`, not per-widget `initState`.
final resource = AgentCallEntry.resource(
namespace: 'app',
name: 'app_cart_digest',
description: 'Compact cart summary for agents (read-only).',
mimeType: 'application/json',
handler: (final args) async => AgentResult.success(
message: 'Cart digest',
data: {
'itemCount': CartRepository.instance.visibleCount,
'currency': CartRepository.instance.currencyCode,
},
),
);Or via bridge:
mcpToolkitResource(
namespace: 'app',
definition: MCPResourceDefinition(
name: 'app_cart_digest',
description: 'Compact cart summary for agents (read-only).',
mimeType: 'application/json',
),
handler: (final request) async => MCPCallResult(
message: 'Cart digest',
parameters: {'itemCount': 3},
),
),The MCP server enforces strict JSON Schema:
1. **`fmt_list_client_tools_and_resources`** — enumerate app-registered tools and resources. 2. **`fmt_client_tool`** — invoke a dynamic tool by name with JSON args. 3. **`fmt_client_resource`** — fetch a registered resource URI from the listing.
If something should appear but does not: confirm **`addEntries`** completed (**`await`**), then hot **restart**.
Inspect and drive a running Flutter app from your AI assistant. 📖 Docs: docs.page/arenukvern/mcp_flutter 🤝 Contribute: guide · contributors · code of conduct · security flutter-mcp-toolkit is a Dart MCP server + Flutter package for AI agents (Codex, Zed,
Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…
Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where…
Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of…
Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or…
Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples:…
Use when the user wants to rename, extract, split, move, or restructure code safely. Examples: \"Rename this function\",…