Skip to main content
Glama

O'RLY MCP Server

test_validation.py•1.83 kB
#!/usr/bin/env python3 """ Test the validation in the ORLY MCP server """ import sys import os # Add the current directory to the path sys.path.append(os.path.dirname(os.path.abspath(__file__))) from orly_mcp.server import generate_orly_cover def test_validation(): """Test the validation in the MCP tool""" print("šŸ” Testing validation...") # Test valid parameters try: result = generate_orly_cover( title="Valid Test", image_code="20", theme="10" ) print("āœ… Valid parameters work correctly") except Exception as e: print(f"āŒ Valid parameters failed: {e}") return # Test invalid image code try: generate_orly_cover(title="Test", image_code="50") print("āŒ Should have failed with invalid image code") except (ValueError, RuntimeError) as e: print(f"āœ… Correctly caught invalid image code: {e}") # Test invalid theme try: generate_orly_cover(title="Test", theme="20") print("āŒ Should have failed with invalid theme") except (ValueError, RuntimeError) as e: print(f"āœ… Correctly caught invalid theme: {e}") # Test invalid placement try: generate_orly_cover(title="Test", guide_text_placement="invalid") print("āŒ Should have failed with invalid placement") except (ValueError, RuntimeError) as e: print(f"āœ… Correctly caught invalid placement: {e}") # Test empty title try: generate_orly_cover(title="") print("āŒ Should have failed with empty title") except (ValueError, RuntimeError) as e: print(f"āœ… Correctly caught empty title: {e}") print("\nšŸŽ‰ All validation tests passed!") if __name__ == "__main__": test_validation()

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/princefishthrower/orly-mcp'

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