from openai import OpenAI from dotenv import load_dotenv from pathlib import Path import json readPath = Path(__file__).parent / "toolsDescriptions/tool_docs.json" load_dotenv() def main(): client = OpenAI() with open(readPath, "r") as f: tool_description = json.load(f) instructions = "Tool usage guidance:\n" + json.dumps(tool_description, indent=2) response = client.responses.create( model= "gpt-4o", tools= [{ "type": "mcp", "server_label": "ScriScribeMCPHuggingFacebeMCP", "server_url": "https://eporath-scribe-mcp.hf.space/mcp", "require_approval": "never", }], input = "Query the vulnerabilities table for the top 5 risky CVEs - KEV vulnerabilities and vulnerabilities with highest EPSS scores." #+ "Take each risky CVES from the first query and then Query the vulnerabilities table of each of them to get a list of affected products." #+ "Create a report summarizing the findings." #+ "Query the lineage check if these products have assets of type pod; in that case these products are in production and are more risky." #instructions = instructions ) print(response.output_text) if __name__ == "__main__": main()