# get_all_basemodel_annotations

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/tools/base/get_all_basemodel_annotations)

Get all annotations from a Pydantic `BaseModel` and its parents.

## Signature

```python
get_all_basemodel_annotations(
    cls: TypeBaseModel | Any,
    *,
    default_to_bound: bool = True,
) -> dict[str, type | TypeVar]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `cls` | `TypeBaseModel \| Any` | Yes | The Pydantic `BaseModel` class. |
| `default_to_bound` | `bool` | No | Whether to default to the bound of a `TypeVar` if it exists. (default: `True`) |

## Returns

`dict[str, type | TypeVar]`

`dict` of field names to their type annotations.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/core/langchain_core/tools/base.py#L1471)