toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'name': name,
      if (displayName != null) 'displayName': displayName,
      if (description != null) 'description': description,
      if (prompt != null) 'prompt': prompt,
      if (tools != null) 'tools': tools,
      if (mcpServers != null)
        'mcpServers':
            mcpServers!.map((key, value) => MapEntry(key, value.toJson())),
      if (infer != null) 'infer': infer,
    };