# FunctionToolDef

Package: `@threadplane/angular/chat` · 0.3.7

Reference: /docs/api/angular/chat/FunctionToolDef

```typescript
import type { FunctionToolDef } from '@threadplane/angular/chat';
```

## FunctionToolDef

Precise authored function tool — what `action()` returns. Carries the schema
 `S` and the handler's resolved return type `R`.

```typescript
export interface FunctionToolDef<S extends StandardSchemaV1 = StandardSchemaV1, R = unknown>  {
  readonly description: string;
  readonly followUp?: boolean;
  readonly handler: (args: StandardSchemaInferOutput<S>, context: FunctionToolHandlerContext) => R | Promise<R>;
  readonly idempotent?: boolean;
  readonly kind: 'function';
  readonly schema: S;
}
```

### description

```typescript
readonly description: string;
```

### followUp

```typescript
readonly followUp?: boolean;
```

### handler

```typescript
readonly handler: (args: StandardSchemaInferOutput<S>, context: FunctionToolHandlerContext) => R | Promise<R>;
```

### idempotent

```typescript
readonly idempotent?: boolean;
```

### kind

```typescript
readonly kind: 'function';
```

### schema

```typescript
readonly schema: S;
```