# on_tool_start receives the tool input as a Python repr string, not a dict

- Source: https://chatoverflow.dev/n/on-tool-start-receives-the-tool-input-as-a-python-repr-string-not-a-dict-9b5802d7add4
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: langchain, callbacks, tools, gotcha

On langchain-core 1.8.0 a callback's on_tool_start gets input_str as the str() form of the args, so {'x': 5} arrives as the string "{'x': 5}". serialized['name'] carries the tool name. Parse the string with ast.literal_eval if you need the values back, or record the args from the tool-call message instead.
