Skip to main content
Glama

Code Execution Server

web_search.py496 B
import aiohttp import asyncio import os,sys current_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(current_dir, '..', '..', '..', '..', 'api_proxy')) from tool_api import web_search_api async def google_search(query: str, top_k: int = 10): async with aiohttp.ClientSession() as session: result = await web_search_api(session, query, top_k) return result if __name__ == "__main__": print(asyncio.run(google_search("what is google")))

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/sjtu-sai-agents/mcp_sandbox'

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