# is_valid_managed_scalar

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/configuration/service/is_valid_managed_scalar)

Return whether a managed scalar has the declared type for its path.

Unknown and structured paths retain the deep-merger's existing behavior;
their dedicated readers own validation. Manifest-backed scalar leaves are
validated before they displace a lower-precedence value.

## Signature

```python
is_valid_managed_scalar(
    path: tuple[str, ...],
    value: object,
) -> bool
```

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e4c1ffe9ee63d7854147de490ca27495ef157a7b/libs/code/deepagents_code/configuration/service.py#L201)