# McpProviderIcon constructor

Kind: Constructor  
Namespace: `Sisk.ModelContextProtocol`  
Assembly: `Sisk.ModelContextProtocol.dll`  
Source: https://docs.sisk-framework.org/api/Sisk.ModelContextProtocol.McpProviderIcon.-ctor.html

## McpProviderIcon(string, string?, IEnumerable&lt;McpProviderIconSize>?, McpProviderIconTheme?) {#Sisk_ModelContextProtocol_McpProviderIcon__ctor_System_String_System_String_System_Collections_Generic_IEnumerable_Sisk_ModelContextProtocol_McpProviderIconSize__System_Nullable_Sisk_ModelContextProtocol_McpProviderIconTheme__}

Creates an icon with the specified source and optional display metadata.

```csharp
public McpProviderIcon(string sourceUrl, string? mimeType = null, IEnumerable<McpProviderIconSize>? sizes = null, McpProviderIconTheme? theme = null)
```

### Parameters

`sourceUrl` [string](https://learn.microsoft.com/dotnet/api/system.string)

The URI of the icon resource.

`mimeType` [string](https://learn.microsoft.com/dotnet/api/system.string)?

The MIME type of the icon, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) to let the client infer it.

`sizes` [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable\-1)<[McpProviderIconSize](https://docs.sisk-framework.org/api/Sisk.ModelContextProtocol.McpProviderIconSize.md)\>?

The supported icon sizes, or [`null`](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) if the icon can be used at any size.

`theme` [McpProviderIconTheme](https://docs.sisk-framework.org/api/Sisk.ModelContextProtocol.McpProviderIconTheme.md)?

The color theme for which the icon is intended.

### Exceptions

[ArgumentException](https://learn.microsoft.com/dotnet/api/system.argumentexception)

`sourceUrl` is empty or consists only of white-space characters.
