from praisonai.mcp_server.registry import MCPToolRegistry, MCPToolDefinition
# Create registry with tools
registry = MCPToolRegistry()
registry._tools["memory.show"] = MCPToolDefinition(
name="memory.show",
description="Show memory contents",
handler=lambda: None,
input_schema={"type": "object"},
category="memory",
read_only_hint=True,
)
registry._tools["file.delete"] = MCPToolDefinition(
name="file.delete",
description="Delete a file",
handler=lambda: None,
input_schema={"type": "object"},
category="file",
destructive_hint=True,
)
# Search by query
results, next_cursor, total = registry.search(query="memory")
print(f"Found {total} tools matching 'memory'")