File size: 528 Bytes
7e2f74d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | from abc import ABC, abstractmethod
from typing import Any
class BaseTool(ABC):
"""
Abstract Base Class for all LLM-callable tools.
Compatible with Model Context Protocol (MCP) and agent execution environments.
"""
@property
@abstractmethod
def name(self) -> str:
pass
@property
@abstractmethod
def description(self) -> str:
pass
@abstractmethod
def execute(self, **kwargs) -> Any:
"""Executes the tool's action with provided arguments."""
pass
|