get_component
Retrieve a specific component by its ID to access detailed information within threat modeling resources.
Instructions
Get a specific component by ID
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"component_id": "<component_id>"
},
"name": "get_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:129-134 (handler)The MCP tool handler for 'get_component', registered via @mcp.tool(). It fetches the component using the API client and returns it as a string.
@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) - The API client's get_component method, which makes the authenticated HTTP GET request to retrieve the specific component from the Devici API.
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}")