Skip to main content
Glama

get_threats_by_component

Retrieve security threats associated with a specific component to identify vulnerabilities and assess risk in threat modeling workflows.

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 function for get_threats_by_component. It creates an API client context and delegates to the client's get_threats_by_component method, returning 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)
  • API client helper method that makes a GET request to /threats/component/{component_id} to fetch threats for the given 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 full burden. It states it 'gets' threats, implying a read-only operation, but doesn't disclose behavioral traits like whether it requires authentication, returns paginated results, has rate limits, or what happens with invalid component_id. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by specifying the tool's 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 1 parameter with 0% schema coverage, no annotations, but an output schema exists, the description is minimally adequate. The output schema likely defines return values, so the description doesn't need to explain those. However, for a tool that presumably queries a database or API, more context on behavior (e.g., error handling, data freshness) would improve completeness.

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?

Schema description coverage is 0%, so the description must compensate. It mentions 'for a specific component', which hints at the 'component_id' parameter's purpose, but doesn't explain what a component is, the expected format of component_id, or provide any examples. With 1 parameter fully undocumented in the schema, the description adds minimal semantic value.

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

Purpose4/5

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

The description clearly states the verb 'Get' and the resource 'threats', specifying the scope 'for a specific component'. It distinguishes from sibling tools like 'get_threats' (which presumably gets all threats) by adding the component filter. However, it doesn't explicitly mention what 'threats' are in this context (e.g., security threats, operational threats).

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

Usage Guidelines3/5

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

The description implies usage when you need threats for a specific component rather than all threats (suggesting 'get_threats' as an alternative). However, it doesn't provide explicit guidance on when to use this vs. other threat-related tools like 'get_threat' (singular) or 'get_mitigations_by_threat', nor does it mention prerequisites like needing a valid component_id.

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

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