# addFunctionTool

- 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 function calling tool to a Microsoft Foundry project, enabling agents to call application-defined functions with structured parameters.

## Definition

```typescript
interface AzureCognitiveServicesProjectResource {
  // ... omitted for brevity
  addFunctionTool(
    name: string,
    functionName: string,
    parametersJson: string,
    description?: string,
    strictModeEnabled?: boolean): FunctionToolResource
}
```

## Parameters

- `name` (`string`)
- `functionName` (`string`)
- `parametersJson` (`string`)
- `description` (`string`) `optional`
- `strictModeEnabled` (`boolean`) `optional`

## Returns

[FunctionToolResource](/reference/api/typescript/aspire.hosting.foundry/functiontoolresource.md) `builder`

## Applies to

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