diff --git a/agent.py b/agent.py index 5962b82..0f298a0 100644 --- a/agent.py +++ b/agent.py @@ -42,12 +42,13 @@ APPROVAL_PHRASE = "I_APPROVE_THE_LISTED_STEPS" OUTPUT_ROOT = "outputs/integrations" SECRET_WORDS = ("secret", "token", "password", "passwd", "apikey", "api_key", "authorization", "bearer") -_PUBLIC_REQUEST_SCHEMA: dict[str, Any] = { - "type": "object", - "required": ["request"], - "additionalProperties": False, - "properties": {"request": {"type": "object", "additionalProperties": True}}, -} +def _tool_input_schema(request_model: type[BaseModel]) -> dict[str, Any]: + return { + "type": "object", + "required": ["request"], + "additionalProperties": False, + "properties": {"request": request_model.model_json_schema()}, + } class StrictModel(BaseModel):