# addCodeInterpreterTool

- Module: [Aspire.Hosting.Foundry](/reference/api/typescript/aspire.hosting.foundry.md)
- Version: `13.4.0-preview.1.26281.18`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Adds a Code Interpreter tool to a Microsoft Foundry project, enabling agents to write and run Python code in a sandboxed environment for data analysis, math, and chart generation.

## Definition

```typescript
interface AzureCognitiveServicesProjectResource {
  // ... omitted for brevity
  addCodeInterpreterTool(name: string): CodeInterpreterToolResource
}
```

## Parameters

- `name` (`string`)

## Returns

[CodeInterpreterToolResource](/reference/api/typescript/aspire.hosting.foundry/codeinterpretertoolresource.md) `builder`

## Applies to

- [AzureCognitiveServicesProjectResource](/reference/api/typescript/aspire.hosting.foundry/azurecognitiveservicesprojectresource.md)
