def get_metadata_from_fn_name(
        self, fn_name: str, spec_functions: Optional[List[SPEC_FUNCTION_TYPE]] = None
    ) -> Optional[ToolMetadata]:
        """
        NOTE: This function is deprecated and kept only for backwards compatibility.

        Return map from function name.

        Return type is Optional, meaning that the schema can be None.
        In this case, it's up to the downstream tool implementation to infer the schema.

        """
        schema = self.get_fn_schema_from_fn_name(fn_name, spec_functions=spec_functions)
        if schema is None:
            return None

        func = getattr(self, fn_name)
        name = fn_name
        docstring = func.__doc__ or ""
        description = f"{name}{signature(func)}\n{docstring}"
        fn_schema = self.get_fn_schema_from_fn_name(
            fn_name, spec_functions=spec_functions
        )
        return ToolMetadata(name=name, description=description, fn_schema=fn_schema)

        NOTE: This function is deprecated and kept only for backwards compatibility.

        Return map from function name.

        Return type is Optional, meaning that the schema can be None.
        In this case, it's up to the downstream tool implementation to infer the schema.

        
llama-index-core/llama_index/core/tools/tool_spec/base.py