Skip to main content
Glama

get_component

Retrieve a specific security component by its ID to access threat model details within the Devici system.

Instructions

Get a specific component by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
component_idYes

Implementation Reference

  • MCP tool handler for 'get_component'. Registers the tool and implements the logic by calling the API client to retrieve a component by ID and returning the result 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)
  • Registration of the 'get_component' tool using the @mcp.tool() decorator on the handler function.
    @mcp.tool()
  • Helper function in API client that makes the HTTP GET request to fetch a specific component by ID 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}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sdelements/devici-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server