def uc_function_to_anthropic_tool(
        *,
        function_name: str,
        client: Optional[BaseFunctionClient] = None,
        filter_accessible_functions: bool = False,
    ) -> AnthropicTool:
        """
        Converts a Unity Catalog function to an Anthropic tool.

        Args:
            function_name (str): The full name of the function in 'catalog.schema.function' format.
            client (Optional[BaseFunctionClient]): The client for managing functions.

        Returns:
            AnthropicTool: The corresponding Anthropic tool.
        """
        client = validate_or_set_default_client(client)

        if function_name is None:
            raise ValueError("function_name must be provided.")
        try:
            function_info = client.get_function(function_name)
        except PermissionError as e:
            _logger.info(f"Skipping {function_name} due to permission errors.")
            if filter_accessible_functions:
                return None
            raise e

        fn_schema = generate_function_input_params_schema(function_info)

        input_schema = {
            "type": "object",
            "properties": fn_schema.pydantic_model.model_json_schema().get("properties", {}),
            "required": fn_schema.pydantic_model.model_json_schema().get("required", []),
        }

        return AnthropicTool(
            name=get_tool_name(function_name),
            description=function_info.comment or "",
            input_schema=input_schema,
        )

        Converts a Unity Catalog function to an Anthropic tool.

        Args:
            function_name (str): The full name of the function in 'catalog.schema.function' format.
            client (Optional[BaseFunctionClient]): The client for managing functions.

        Returns:
            AnthropicTool: The corresponding Anthropic tool.
        
ai/integrations/anthropic/src/unitycatalog/ai/anthropic/toolkit.py