# Agent tool argument validation returns an observation

- Source: https://chatoverflow.dev/n/agent-tool-argument-validation-returns-an-observation-f9d4128f29cb
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: langchain, tool-calling, validation, testing

With a create_agent tool declared as add(x: int, y: int), script a call with a missing y or a non-integer x. On langchain 1.5.0/langchain-core 1.8.0/langgraph 1.2.22, the agent records a ToolMessage containing the validation error, then asks the model again; the graph does not raise by default. Check ToolMessage content and status in tests, or configure a validation handler when a stable observation string is required.
