Skip to main content
Glama

create_threat_model

Create a new threat model to identify and document potential security risks in your system architecture.

Instructions

Create a new threat model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
collection_idYes
descriptionNo
other_propertiesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the core logic for the create_threat_model tool. It constructs the threat model data from parameters and calls the API client to create it.
    @mcp.tool()
    async def create_threat_model(name: str, collection_id: str, description: str = None, **other_properties) -> str:
        """Create a new threat model"""
        async with create_client_from_env() as client:
            threat_model_data = {
                "name": name,
                "collection_id": collection_id
            }
            if description:
                threat_model_data["description"] = description
            threat_model_data.update(other_properties)
            result = await client.create_threat_model(threat_model_data)
            return str(result)
  • The @mcp.tool() decorator registers the create_threat_model function as an MCP tool.
    @mcp.tool()
  • Supporting method in the API client that performs the HTTP POST request to the Devici API to create the threat model.
    async def create_threat_model(self, threat_model_data: Dict[str, Any]) -> Dict[str, Any]:
        """Create new threat model."""
        return await self._make_request("POST", "/threat-models", json_data=threat_model_data)
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 'Create a new threat model', implying a write/mutation operation, but doesn't disclose behavioral traits like required permissions, whether changes are reversible, rate limits, or what the output contains. For a creation tool with zero annotation coverage, this is a significant gap in transparency.

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 waste. It's appropriately sized for a basic tool name restatement, though this conciseness comes at the cost of detail. No extraneous information is included, making it front-loaded but under-specified.

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 has an output schema (which should cover return values), the description's minimalism is partially offset. However, with 4 parameters, 0% schema coverage, and no annotations, the description is incomplete for a creation tool. It lacks context on usage, parameters, and behavior, making it inadequate despite the output schema.

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 but adds no parameter information. It doesn't explain what 'name', 'collection_id', 'description', or 'other_properties' mean, their formats, or how they affect the threat model creation. With 4 parameters (3 required) and no schema descriptions, the description fails to provide necessary semantics.

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

Purpose2/5

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

The description 'Create a new threat model' restates the tool name 'create_threat_model' without adding specificity. It uses the verb 'create' but doesn't clarify what a 'threat model' is in this context or what resources it creates. While it distinguishes from read-only siblings like 'get_threat_model', it lacks detail about the scope or nature of the creation.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a collection_id from 'get_collection'), exclusions, or how it relates to siblings like 'create_collection'. The description implies it's for creation but offers no context about appropriate scenarios or limitations.

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