get_component
Retrieve a specific component by its ID using the Devici MCP Server, enabling precise management of threat modeling resources within your security workflows.
Instructions
Get a specific component by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component_id | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:129-135 (handler)The primary handler for the 'get_component' MCP tool. Registered via @mcp.tool() decorator. Fetches the component data via the API client and serializes it to string for MCP response.@mcp.tool() async def get_component(component_id: str) -> str: """Get a specific component by ID""" async with create_client_from_env() as client: result = await client.get_component(component_id) return str(result)
- API client helper method that executes the HTTP GET request to retrieve a specific component from the Devici API endpoint /components/{component_id}.async def get_component(self, component_id: str) -> Dict[str, Any]: """Get specific component by ID.""" return await self._make_request("GET", f"/components/{component_id}")