| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- """
- -----------------------------------------------------------------------------------------
- INTERSEL - 4 cité d'Hauteville - 75010 PARIS
- RCS PARIS 488 379 660 - NAF 721Z
- File : mcp/request_validator.py
- Object : Request validator for the MCP server
- -----------------------------------------------------------------------------------------
- Modifications :
- - 2026/01/16 - Damien Lugagne-Delpon - V1.0.0- Creation
- -----------------------------------------------------------------------------------------
- @copyright : Intersel 2026
- @author : Damien Lugagne-Delpon - damien.lugagne-delpon@livinweb.fr
- @version : 1.0.0 (to be updated to the current_version of the developed software if file is touched)
- -----------------------------------------------------------------------------------------
- """
- class RequestValidator:
- """Request validator for the MCP server."""
- def __init__(self):
- """Initialize the request validator."""
- self.schema = REQUEST_SCHEMA
- def validate(self, request_data: dict) -> bool:
- """Validate the incoming request data.
- Args:
- request_data (dict): The incoming request data.
- Returns:
- bool: If the request is valid.
- """
- tool = request_data.get("tool")
- parameters = request_data.get("parameters")
- return True
- REQUEST_SCHEMA = {
- "tool": str,
- "parameters": dict
- }
|