# ComputerToolResource Constructors

- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Type: [ComputerToolResource](/reference/api/csharp/aspire.hosting.foundry/computertoolresource.md)
- Kind: `Constructors`
- Members: `1`

A Foundry tool resource that enables an agent to interact with a computer desktop by taking screenshots, moving the mouse, clicking, and typing.

## ComputerToolResource(string, AzureCognitiveServicesProjectResource, int, int, string)

- Name: `Constructor(string, AzureCognitiveServicesProjectResource, int, int, string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/ToolResources/BuiltInToolDefinitions.cs#L146-L151)

Creates a new instance of the [ComputerToolResource](/reference/api/csharp/aspire.hosting.foundry/computertoolresource.md) class.

```csharp
public sealed class ComputerToolResource
{
    public ComputerToolResource(
        string name,
        AzureCognitiveServicesProjectResource project,
        int displayWidth = 1024,
        int displayHeight = 768,
        string environment = "browser")
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the tool resource.
- `project` ([AzureCognitiveServicesProjectResource](/reference/api/csharp/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md))
  The parent Foundry project resource.
- `displayWidth` (`int`) `optional`
  The width of the display in pixels.
- `displayHeight` (`int`) `optional`
  The height of the display in pixels.
- `environment` (`string`) `optional`
  The environment identifier (e.g., "browser").
