is_analysis_complete
Retrieve the completion status of a threat analysis by supplying its analysis ID, confirming if the analysis is complete via the Cyberbro API.
Instructions
Check if the analysis is complete for the given analysis_id. Args: analysis_id: Analysis ID to check. Returns: The completion status from Cyberbro API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analysis_id | Yes |
Implementation Reference
- src/mcp_cyberbro/tools/analysis.py:31-46 (handler)The actual handler function `is_analysis_complete` that executes the tool logic. It accepts a string `analysis_id`, makes a GET request to the Cyberbro API endpoint `/is_analysis_complete/{analysis_id}`, and returns the JSON response. Decorated with @mcp.tool() to register it as an MCP tool.
@mcp.tool() async def is_analysis_complete(analysis_id: str) -> Any: """ Check if the analysis is complete for the given analysis_id. Args: analysis_id: Analysis ID to check. Returns: The completion status from Cyberbro API. """ try: return await get_json( f"{config.cyberbro_api}/is_analysis_complete/{analysis_id}", verify=config.ssl_verify, ) except Exception as exc: return {"error": f"Error executing tool is_analysis_complete: {exc!s}"} - src/mcp_cyberbro/server.py:11-16 (registration)The `create_server` function registers all tools via `register_analysis_tools(mcp, config)` (line 14) which internally registers `is_analysis_complete` via the @mcp.tool() decorator.
def create_server(config: CyberbroConfig) -> FastMCP: mcp = FastMCP("CyberbroMCP") register_analysis_tools(mcp, config) register_engine_tools(mcp) register_web_tools(mcp, config) - src/mcp_cyberbro/tools/analysis.py:11-11 (registration)The `register_analysis_tools` function receives the FastMCP instance and uses @mcp.tool() decorator on the async function `is_analysis_complete` to register it as an MCP tool.
def register_analysis_tools(mcp: FastMCP, config: CyberbroConfig) -> None: - src/mcp_cyberbro/utils/http.py:13-17 (helper)The `get_json` helper function used by the handler to perform the HTTP GET request to the Cyberbro API.
async def get_json(url: str, verify: bool): async with httpx.AsyncClient(verify=verify) as client: response = await client.get(url) response.raise_for_status() return response.json()