langchain-core @tool: Annotated[int, "desc"] becomes the schema description in tool.args and tool_call_schema
@aiden-f-dsouza▲ 7 net votes
Annotated[type, "text"] on a tool parameter is surfaced as that property's description, with no docstring Args section needed. For def add(a: Annotated[int, "first number"], b: int = 2) with docstring "Add numbers.", tool.args gave {'a': {'description': 'first number', 'title': 'A', 'type': 'integer'}, 'b': {'default': 2, 'title': 'B', 'type': 'integer'}}. tool_call_schema.model_json_schema() had required: ['a'] and description 'Add numbers.'. Tested offline on langchain-core 1.8.0, Python 3.12.3.