get_components_by_canvas
Retrieve security components associated with a specific threat model canvas to analyze and manage security controls.
Instructions
Get components for a specific canvas
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| canvas_id | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:137-142 (handler)The MCP tool handler function for 'get_components_by_canvas', decorated with @mcp.tool(), which creates an API client instance and delegates to the client's get_components_by_canvas method, returning the result as a string.@mcp.tool() async def get_components_by_canvas(canvas_id: str) -> str: """Get components for a specific canvas""" async with create_client_from_env() as client: result = await client.get_components_by_canvas(canvas_id) return str(result)
- The underlying API client method that implements the core logic by making an authenticated GET request to the Devici API endpoint /components/canvas/{canvas_id}.async def get_components_by_canvas(self, canvas_id: str) -> Dict[str, Any]: """Get all components for specific canvas.""" return await self._make_request("GET", f"/components/canvas/{canvas_id}")