Skip to content

Glossary: Agent Tools and MCP

BeforeValidator

A Pydantic hook that runs a function on a value before other checks. Kettle & Crane's clean_id uses it so " kc-20517 " becomes "KC-20517".

Where the book teaches it

Related terms

PydanticAnnotatedField