INNER CODE UNIT · Python

list_resources

FuzzingLabs/mcp-security-hub · binary-analysis/capa-mcp/server.py:284

async def list_resources() -> list[Resource]:
    return [
        Resource(
            uri=f"capa://results/{scan_id}",
            name=f"Capa: {Path(result.filepath).name}",
            mimeType="application/json",
        )
        for scan_id, result in scan_results.items()
        if result.status == "completed"
    ]


@app.read_resource()
async def read_resource(uri: str) -> str:
    if uri.startswith("capa://results/"):
        scan_id = uri.replace("capa://results/", "")
        result = scan_results.get(scan_id)
        if result:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…