Tools in the beeai platform are implemented in line with the Model Context Protocol. Adding a tool to the provider is straightforward:

import asyncio
from acp.server.highlevel import Server, Context
from beeai_sdk.providers.agent import run_agent_provider

def main():
    server = Server("beeai-agents")

    @server.tool()
    async def add(a: int, b: int, ctx: Context) -> int:
        """Add two numbers"""
        return a + b

    asyncio.run(run_agent_provider(server))

After registering the provider (see Providers) to the platform, the tool will be available using the CLI. We can see it in beeai tool list and we can invoke it directly using:

> beeai tool run add '{"a": 1, "b": 2}'

The tools can be used programmatically and by agents through the acp-sdk package or even through the original MCP. This means that you can leverage adapters in frameworks such as:

to enrich agents with tools available in the beeai platform.