{"record":{"id":"331236e3c99e36de","repo":"langchain-ai/langgraph","slug":"tool-schema-name-does-not-have-an-args-schema-de","errorCode":null,"errorMessage":"Tool {schema.name} does not have an args_schema defined.","messagePattern":"Tool (.+?) does not have an args_schema defined\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/prebuilt/langgraph/prebuilt/tool_validator.py","lineNumber":145,"sourceCode":"        Args:\n            schemas: A list of schemas to validate the tool calls with. These can be\n                any of the following:\n                - A pydantic BaseModel class\n                - A BaseTool instance (the args_schema will be used)\n                - A function (a schema will be created from the function signature)\n            format_error: A function that takes an exception, a ToolCall, and a schema\n                and returns a formatted error string. By default, it returns the\n                exception repr and a message to respond after fixing validation errors.\n            name: The name of the node.\n            tags: A list of tags to add to the node.\n        \"\"\"\n        super().__init__(self._func, None, name=name, tags=tags, trace=False)\n        self._format_error = format_error or _default_format_error\n        self.schemas_by_name: dict[str, type[BaseModel]] = {}\n        for schema in schemas:\n            if isinstance(schema, BaseTool):\n                if schema.args_schema is None:\n                    raise ValueError(\n                        f\"Tool {schema.name} does not have an args_schema defined.\"\n                    )\n                elif not isinstance(\n                    schema.args_schema, type\n                ) or not is_basemodel_subclass(schema.args_schema):\n                    raise ValueError(\n                        \"Validation node only works with tools that have a pydantic BaseModel args_schema. \"\n                        f\"Got {schema.name} with args_schema: {schema.args_schema}.\"\n                    )\n                self.schemas_by_name[schema.name] = schema.args_schema\n            elif isinstance(schema, type) and issubclass(\n                schema, (BaseModel, BaseModelV1)\n            ):\n                self.schemas_by_name[schema.__name__] = cast(type[BaseModel], schema)\n            elif callable(schema):\n                base_model = create_schema_from_function(\"Validation\", schema)\n                self.schemas_by_name[schema.__name__] = base_model\n            else:","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/prebuilt/langgraph/prebuilt/tool_validator.py#L127-L163","documentation":"Error \"Tool {schema.name} does not have an args_schema defined.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/prebuilt/langgraph/prebuilt/tool_validator.py:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}