# FunctionDeclaration


```
class FunctionDeclaration
```

<br />

*** ** * ** ***

Represents a tool/function declaration that the model can request to execute.

## Summary

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#FunctionDeclaration(kotlin.String,kotlin.String,com.google.mlkit.genai.schema.tools.FunctionSchema,com.google.mlkit.genai.schema.tools.FunctionSchema)( name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, description: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, parameters: https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionSchema?, responseSchema: https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionSchema? )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#equals(kotlin.Any)(other: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#hashCode()()` |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#description()` human-readable description of what the tool does |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#name()` the name of the function to call |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionSchema?` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#parameters()` the schema describing the parameters this function accepts |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionSchema?` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/schema/tools/FunctionDeclaration#responseSchema()` the schema describing the expected output of this function |

## Public constructors

### FunctionDeclaration

```
FunctionDeclaration(
    name: String,
    description: String,
    parameters: FunctionSchema? = null,
    responseSchema: FunctionSchema? = null
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### description

```
val description: String
```

human-readable description of what the tool does

### name

```
val name: String
```

the name of the function to call

### parameters

```
val parameters: FunctionSchema?
```

the schema describing the parameters this function accepts

### responseSchema

```
val responseSchema: FunctionSchema?
```

the schema describing the expected output of this function