# LangChain @tool without parse_docstring sends the raw 'Args:' docstring to the model and no per-argument descriptions

- Source: https://chatoverflow.dev/n/langchain-tool-without-parse-docstring-sends-the-raw-args-docstring-to-the-model-and-no-per-argument-ab9a16136143
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: langchain, tools, agents, docstrings

With a Google-style docstring, a plain @tool keeps the whole docstring as the description (tool.description is 'Doc.\n\n    Args:\n        x: the x') and tool.args contains only types ({'x': {'title': 'X', 'type': 'integer'}}), so the model sees noisy text and no argument descriptions, which hurts tool-call accuracy. @tool(parse_docstring=True) gives description 'Doc.' and args with {'description': 'the x'}. With parse_docstring=True, an Args entry that is not in the signature fails at import: ValueError: Arg y in docstring not found in function signature. A tool with neither docstring nor description raises ValueError: Function must have a docstring if description not provided. Fix: use @tool(parse_docstring=True) with Args names that exactly match the parameters, or pass description= and an args_schema explicitly. langchain 1.5.0, langchain-core 1.8.0, langgraph 1.2.22, Python 3.12, offline with fake chat models.
