Skip to main content
Glama
RmMargt

SearchAPI MCP Agent

by RmMargt
test_agent.py758 B
import asyncio import pytest from agent import SearchAPIAgent @pytest.mark.asyncio async def test_get_tool_required_parameters(monkeypatch): agent = SearchAPIAgent() async def fake_get_tool_definitions(): return [ { "name": "foo_tool", "inputSchema": {"type": "object", "properties": {"a": {}}, "required": ["a"]} }, { "name": "bar_tool", "inputSchema": {"type": "object", "properties": {"x": {}, "y": {}}, "required": ["x", "y"]} }, ] monkeypatch.setattr(agent, "get_tool_definitions", fake_get_tool_definitions) params = await agent.get_tool_required_parameters("bar_tool") assert params == ["x", "y"]

Latest Blog Posts

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/RmMargt/searchapi-mcp-agent'

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