Skip to main content
Glama

get_threats_by_component

Retrieve security threats associated with a specific component to identify vulnerabilities and support threat modeling analysis.

Instructions

Get threats for a specific component

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
component_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler decorated with @mcp.tool() that executes the tool logic by calling the API client to fetch threats for a given component ID and returns the result as string.
    @mcp.tool()
    async def get_threats_by_component(component_id: str) -> str:
        """Get threats for a specific component"""
        async with create_client_from_env() as client:
            result = await client.get_threats_by_component(component_id)
            return str(result)
  • Helper method in the API client class that performs the actual HTTP GET request to the Devici API endpoint for threats by component.
    async def get_threats_by_component(self, component_id: str) -> Dict[str, Any]:
        """Get all threats for specific component."""
        return await self._make_request("GET", f"/threats/component/{component_id}")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a 'Get' operation, implying read-only behavior, but doesn't clarify authentication needs, rate limits, error conditions, or what the output contains (though an output schema exists). For a tool with zero annotation coverage, this minimal description leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place in conveying the basic purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one required parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and poor schema coverage, it should provide more context about parameter meaning and usage distinctions from siblings to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'a specific component' but doesn't explain what 'component_id' represents, its format, or where to obtain it. With 0% schema description coverage (the schema only provides a title 'Component Id'), the description fails to compensate for this gap. It adds minimal value beyond the schema's basic parameter name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get threats for a specific component' clearly states the verb ('Get') and resource ('threats'), with a scope modifier ('for a specific component'). However, it doesn't distinguish this tool from sibling tools like 'get_threats' (which likely gets all threats) or 'get_threat' (which gets a single threat), leaving ambiguity about when to use this specific tool versus those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_threats' and 'get_threat' available, there's no indication whether this tool is for filtering threats by component, retrieving component-specific threat details, or some other purpose. No prerequisites, exclusions, or comparative context are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/geoffwhittington/devici-mcp'

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