get_components
Retrieve security components from Devici with pagination controls for managing threat models and mitigations.
Instructions
Get components from Devici with pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| page | No |
Implementation Reference
- src/devici_mcp_server/server.py:121-126 (handler)MCP tool handler for get_components: decorated with @mcp.tool(), fetches paginated components via API client and returns JSON string.@mcp.tool() async def get_components(limit: int = 20, page: int = 0) -> str: """Get components from Devici with pagination""" async with create_client_from_env() as client: result = await client.get_components(limit=limit, page=page) return str(result)
- API client implementation: performs authenticated GET request to /components/ endpoint with pagination parameters.async def get_components(self, limit: int = 20, page: int = 0) -> Dict[str, Any]: """Get all components.""" params = {"limit": limit, "page": page} return await self._make_request("GET", "/components/", params=params)
- src/devici_mcp_server/server.py:121-121 (registration)Registration of the get_components tool via FastMCP @mcp.tool() decorator.@mcp.tool()