1414
1515@mcp .tool ()
1616async def verify_llm (spec : str ) -> dict :
17- """Verify an LLM model specification using the FastAPI server."""
17+ """
18+ Verify an LLM model specification using the FastAPI server
19+
20+ Returns:
21+ dict: containing the verification result form the FastAPI server
22+
23+ Args: spect(str): The specification of the LLM model to verify.
24+
25+ """
1826 url = f"{ AGENTIC_SECURITY } /verify"
1927 async with httpx .AsyncClient () as client :
2028 response = await client .post (url , json = {"spec" : spec })
@@ -28,7 +36,18 @@ async def start_scan(
2836 optimize : bool = False ,
2937 enableMultiStepAttack : bool = False ,
3038) -> dict :
31- """Start an LLM security scan via the FastAPI server."""
39+ """
40+ Start an LLM security scan via the FastAPI server.
41+ Returns:
42+ dict: The scan initiation result from the FastAPI server.
43+
44+ Args:
45+ llmSpec (str): The specification of the LLM model.
46+ maxBudget (int): The maximum budget for the scan.
47+ optimize (bool, optional): Whether to enable optimization during scanning. Defaults to False.
48+ enableMultiStepAttack (bool, optional): Whether to enable multi-step attack
49+
50+ """
3251 url = f"{ AGENTIC_SECURITY } /scan"
3352 payload = {
3453 "llmSpec" : llmSpec ,
@@ -46,7 +65,11 @@ async def start_scan(
4665
4766@mcp .tool ()
4867async def stop_scan () -> dict :
49- """Stop an ongoing scan via the FastAPI server."""
68+ """Stop an ongoing scan via the FastAPI server.
69+
70+ Returns:
71+ dict: The confirmation from the FastAPI server that the scan has been stopped.
72+ """
5073 url = f"{ AGENTIC_SECURITY } /stop"
5174 async with httpx .AsyncClient () as client :
5275 response = await client .post (url )
@@ -55,7 +78,12 @@ async def stop_scan() -> dict:
5578
5679@mcp .tool ()
5780async def get_data_config () -> list :
58- """Retrieve data configuration from the FastAPI server."""
81+ """
82+ Retrieve data configuration from the FastAPI server.
83+
84+ Returns:
85+ list: The response from the FastAPI server, confirming the scan has been stopped.
86+ """
5987 url = f"{ AGENTIC_SECURITY } /v1/data-config"
6088 async with httpx .AsyncClient () as client :
6189 response = await client .get (url )
@@ -64,7 +92,12 @@ async def get_data_config() -> list:
6492
6593@mcp .tool ()
6694async def get_spec_templates () -> list :
67- """Retrieve data configuration from the FastAPI server."""
95+ """
96+ Retrieve data configuration from the FastAPI server.
97+
98+ Returns:
99+ list: The LLM specification templates from the FastAPI server.
100+ """
68101 url = f"{ AGENTIC_SECURITY } /v1/llm-specs"
69102 async with httpx .AsyncClient () as client :
70103 response = await client .get (url )
0 commit comments