Skip to main content
Glama
awslabs

Threat Modeling MCP Server

Official
by awslabs

validate_security_controls

Analyze the codebase to verify which security controls are implemented and update the threat model with actual mitigations.

Instructions

Check what security controls are implemented in code and update threat model.

Given the current threats and mitigations in the threat model, analyze the codebase to determine what's actually implemented and update the threat model accordingly. The agent should autonomously decide how to analyze the code.

Args: ctx: MCP context for logging and error handling code_directory: Directory containing code to analyze file_patterns: Optional list of file patterns to include (e.g., [".py", ".js"])

Returns: Simple instruction for autonomous analysis

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_patternsNo
code_directoryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the mutation of the threat model ('update the threat model accordingly'), the autonomous decision-making expected of the agent, and the return type ('Simple instruction for autonomous analysis'). This goes beyond basic operation description.

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

Conciseness4/5

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

The description is concise and well-structured: a lead purpose sentence, a context paragraph, and an Args/Returns section. Every part earns its place, though the first two sentences are slightly redundant. No unnecessary filler.

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

Completeness4/5

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

For a complex tool, the description provides a clear high-level workflow: analyze code, compare against threat model, update model, return an instruction. It does not detail the output schema, but since an output schema exists, that is acceptable. It could elaborate on the scope of updates, but overall it is sufficient.

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

Parameters4/5

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

The description provides explanations for both schema parameters: code_directory ('Directory containing code to analyze') and file_patterns ('Optional list of file patterns to include'). It also includes 'ctx' which is not in the schema, creating minor inconsistency, but the key parameters are well-covered despite the 0% schema coverage signal.

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

Purpose5/5

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

The description opens with a specific verb+resource: 'Check what security controls are implemented in code and update threat model.' This clearly states what the tool does and distinguishes it from siblings like 'validate_threat_model_against_code' by emphasizing the update action and autonomous analysis.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool: 'Given the current threats and mitigations in the threat model, analyze the codebase...' This implies a precondition (existing threat model) and a scenario. However, it does not explicitly mention alternatives or exclusions, which prevents a 5.

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/awslabs/threat-modeling-mcp-server'

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