from dataclasses import dataclass
from typing import Dict, List, Any


@dataclass
class Host:
    name: str
    default_url: str


@dataclass
class Tool:
    name: str
    description: str
    input_schema: dict
    hive: str
    security_schemes: List[Dict[str, Any]]
    host: Host

    def to_llm_tool(self):
        return {
            "name": self.name,
            "description": self.description,
            "input_schema": self.input_schema,
        }


@dataclass
class ToolConfig:
    id: str
    name: str
    security_schemes: List[Dict[str, Any]]
    host: Host

    def __init__(self, **kwargs):
        self.id = kwargs["id"]
        self.name = kwargs["name"]
        self.security_schemes = kwargs["security_schemes"]
        self.host = Host(**kwargs["host"])
