mcpTools method

  1. @override
List<McpToolDescriptor> mcpTools()

Returns the MCP tool descriptors this provider contributes.

Defaults to an empty list so existing providers compile without modification. Override to expose VM-Service-backed tools to the MCP server (see McpToolDescriptor for the descriptor contract).

Implementation

@override
List<McpToolDescriptor> mcpTools() => const <McpToolDescriptor>[
  McpToolDescriptor(
    name: 'payments_doctor',
    description:
        'Check the Magic Payments installation and configuration of the '
        'project in the current working directory.\n\n'
        'Runs six checks, each reading one file: the magic_payments '
        'dependency in pubspec.yaml, its resolution in '
        '.dart_tool/package_config.json, the presence of '
        'lib/config/payments.dart, the payments root and driver value inside '
        'it, the PaymentsServiceProvider entry in lib/config/app.dart, and '
        'the paymentsConfig entry in lib/main.dart configFactories.\n\n'
        'It does NOT report which payment rail a build can serve: that is '
        'decided by a conditional import at compile time, so no CLI process '
        'can read the answer for a platform it is not compiled for.\n\n'
        'Usage:\n'
        '- Call with no arguments for the report and a pass/fail exit code.\n'
        '- Set verbose to true to also print the path and the requirement '
        'behind each check.',
    inputSchema: <String, dynamic>{
      'type': 'object',
      'properties': <String, dynamic>{
        'verbose': <String, dynamic>{
          'type': 'boolean',
          'description':
              'Print the path and the requirement behind each check. '
              'Default: false.',
        },
      },
    },
    extensionMethod: 'artisan:payments:doctor',
  ),
];