# HostAIProviderPermissions class
{: .no_toc }

What the user allows an AI model to do, by the three boxes under the model in the **AI** group of [IDE Options](/tB/IDE/Customising/IDE-Options.md#ai-models). Reached through [**HostAIProvider.Permissions**](/tB/Packages/tbIDE/HostAIProvider.md#permissions).

> [!IMPORTANT]
> The IDE does not enforce these permissions; the add-in does. Before it registers a tool that reads the project's files, changes them or runs code, an add-in checks the matching property, and leaves the tool out when it is **False**. The dialog says so under each model: *Permissions are enforced by each individual Add-In.*

```tb check_build
Private Sub AddTools(ByVal Provider As HostAIProvider, ByVal Chat As AIConversation)
    If Provider.Permissions.AllowRead Then
        Chat.RegisterTool "read_file", "Returns the text of a file of the project", _
            "{""type"": ""object"", ""properties"": {""path"": {""type"": ""string""}}, ""required"": [""path""]}"
    End If
End Sub
```

* TOC
{:toc}

## Properties

### AllowExecute
{: .no_toc }

**True** when **Allow AI to execute code** is ticked. **Boolean**, read-only.

### AllowRead
{: .no_toc }

**True** when **Allow AI to read source files** is ticked. **Boolean**, read-only.

### AllowWrite
{: .no_toc }

**True** when **Allow AI to write source files** is ticked. **Boolean**, read-only.

## See Also

- [HostAIProvider.Permissions](/tB/Packages/tbIDE/HostAIProvider.md#permissions) property
- [AIConversation.RegisterTool](/tB/Packages/tbIDE/AIConversation.md#registertool) method
