Skip to main content
Glama

Extend AI Toolkit MCP Server

Official
agent_toolkit.py1.18 kB
from abc import abstractmethod from typing import List, Generic from pydantic import PrivateAttr from .api import ExtendAPI from .configuration import Configuration from .enums import Agent from .interfaces import ToolType from .tools import Tool, tools class AgentToolkit(Generic[ToolType]): _tools: List[ToolType] = PrivateAttr(default=[]) agent: Agent def __init__( self, extend_api: ExtendAPI, configuration: Configuration, ): super().__init__() self._tools = [ self.tool_for_agent(extend_api, tool) for tool in configuration.allowed_tools(tools) ] @classmethod def default_instance(cls, api_key: str, api_secret: str, configuration: Configuration) -> "AgentToolkit": return cls( extend_api=ExtendAPI.default_instance(api_key, api_secret), configuration=configuration ) @abstractmethod def tool_for_agent(self, api: ExtendAPI, tool: Tool) -> ToolType: raise NotImplementedError("Subclasses must implement tool_for_agent()") def get_tools(self) -> List[ToolType]: return self._tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paywithextend/extend-ai-toolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server