MCPcopy Create free account

hub / github.com/awslabs/threat-modeling-mcp-server / functions

Functions448 in github.com/awslabs/threat-modeling-mcp-server

↓ 37 callersFunctionbatch_add
Handle batch or single add operations. If `items` is provided, iterates over the list and calls impl_fn for each item. Otherwise, calls i
threat_modeling_mcp_server/utils/batch_utils.py:12
↓ 37 callersFunctionvalidate_enum_with_enhanced_error
Validate an enum value and provide enhanced error messages on failure. This function provides multiple layers of matching: 1. Exact match
threat_modeling_mcp_server/validation/enum_validator.py:125
↓ 25 callersFunctionadd_threat_impl
Add a new threat to the model.
threat_modeling_mcp_server/tools/threat_generator.py:47
↓ 25 callersFunctionget_phase_guidance
Get detailed guidance for a specific phase. Args: phase_number: The phase number to get guidance for Returns: Ma
threat_modeling_mcp_server/tools/step_orchestrator.py:126
↓ 22 callersFunctionbatch_delete
Handle batch or single delete operations. If `ids` is provided, iterates over the list and calls impl_fn for each id. Otherwise, calls im
threat_modeling_mcp_server/utils/batch_utils.py:121
↓ 20 callersFunctioncheck
(test_name, condition, detail="")
tests/test_batch_integration.py:46
↓ 20 callersFunctioninitialize_trust_boundaries
Initialize the trust boundary library with default values.
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:23
↓ 16 callersFunctionbatch_update
Handle batch or single update operations. If `items` is provided, iterates over the list and calls impl_fn for each item. Each item in th
threat_modeling_mcp_server/utils/batch_utils.py:66
↓ 15 callersFunctionadd_mitigation_impl
Add a new mitigation to the model.
threat_modeling_mcp_server/tools/threat_generator.py:357
↓ 10 callersFunction_truncate_field
Truncate a string to max_length for Threat Composer schema compliance.
threat_modeling_mcp_server/tools/threat_generator.py:36
↓ 10 callersFunctioninitialize_threat_actors
Initialize the threat actor library with default actors.
threat_modeling_mcp_server/tools/threat_actor_analyzer.py:20
↓ 9 callersFunctiondetect_phase_completion
Detect and update phase completion based on actual work done.
threat_modeling_mcp_server/tools/step_orchestrator.py:30
↓ 9 callersFunctionlink_mitigation_to_threat_impl
Link a mitigation to a threat.
threat_modeling_mcp_server/tools/threat_generator.py:594
↓ 8 callersFunction_truncate
Truncate a string to max_length, preserving whole words where possible.
threat_modeling_mcp_server/utils/comprehensive_exporter.py:88
↓ 8 callersFunctionadd_component_impl
Add a new component to the architecture. Args: ctx: MCP context for logging and error handling name: Name of the component
threat_modeling_mcp_server/tools/architecture_analyzer.py:24
↓ 6 callersFunctionconvert_generic_objects_to_dict
Convert generic objects to dictionary format using their dict() method. Args: objects: Dictionary of objects with dict() method
threat_modeling_mcp_server/utils/comprehensive_exporter.py:256
↓ 6 callersFunctiondiscover_enum_classes_fresh
Dynamically discover all Enum classes by re-scanning modules. This ensures we always get the most current enum definitions. Returns:
threat_modeling_mcp_server/validation/enum_validator.py:9
↓ 6 callersFunctionget_current_phase_auto
Automatically determine the current phase based on completion status.
threat_modeling_mcp_server/tools/step_orchestrator.py:103
↓ 6 callersFunctionnormalize_output_path
Normalize a file path for consistent output. Args: path: The file path to normalize Returns: A normalized string
threat_modeling_mcp_server/utils/file_utils.py:8
↓ 5 callersFunctionget_current_enum_values
Get current enum values dynamically from the enum class. Args: enum_class_name: Name of the enum class Returns:
threat_modeling_mcp_server/validation/enum_validator.py:46
↓ 5 callersFunctionget_current_phase_status
Get the current phase status and completion progress. Returns: Dictionary with current phase information and completion percentages
threat_modeling_mcp_server/tools/step_orchestrator.py:639
↓ 4 callersFunctioncollect_all_state
Collect all global state variables from threat modeling modules. Returns: ThreatModelState object containing all current state
threat_modeling_mcp_server/utils/state_collector.py:41
↓ 4 callersMethodget_common_mitigations
Get common mitigations organized by category.
threat_modeling_mcp_server/models/threat_models.py:442
↓ 4 callersMethodget_common_threats
Get common threats organized by category.
threat_modeling_mcp_server/models/threat_models.py:236
↓ 4 callersFunctionlist_threats_impl
List all threats in the model.
threat_modeling_mcp_server/tools/threat_generator.py:172
↓ 4 callersFunctionupdate_threat_impl
Update an existing threat.
threat_modeling_mcp_server/tools/threat_generator.py:103
↓ 3 callersFunctiondelete_threat_impl
Delete a threat from the model.
threat_modeling_mcp_server/tools/threat_generator.py:335
↓ 3 callersFunctionget_threat_impl
Get details about a specific threat.
threat_modeling_mcp_server/tools/threat_generator.py:260
↓ 3 callersFunctionlist_mitigations_impl
List all mitigations in the model.
threat_modeling_mcp_server/tools/threat_generator.py:402
↓ 3 callersFunctionunlink_mitigation_from_threat_impl
Unlink a mitigation from a threat.
threat_modeling_mcp_server/tools/threat_generator.py:627
↓ 2 callersFunctionadd_asset_impl
Add a new asset to the system. Args: ctx: MCP context for logging and error handling name: Name of the asset type: Ty
threat_modeling_mcp_server/tools/asset_flow_analyzer.py:24
↓ 2 callersFunctionadd_assumption_impl
Add a new assumption to the threat model. Args: ctx: MCP context for logging and error handling description: Description of the a
threat_modeling_mcp_server/tools/assumption_manager.py:16
↓ 2 callersFunctionadd_trust_zone_impl
Add a new trust zone. Args: ctx: MCP context for logging and error handling name: Name of the trust zone trust_level:
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:36
↓ 2 callersFunctioncheck_business_context_completeness
Check if all business context features are set. Returns: A tuple of (is_complete, missing_features)
threat_modeling_mcp_server/tools/business_context.py:258
↓ 2 callersFunctionconvert_assumptions_to_threat_composer_format
Convert assumptions to Threat Composer format. Args: assumptions: Dictionary of assumption objects Returns: List
threat_modeling_mcp_server/utils/comprehensive_exporter.py:64
↓ 2 callersFunctionconvert_mitigations_to_threat_composer_format
Convert mitigations to Threat Composer format. Args: mitigations: Dictionary of mitigation objects Returns: List
threat_modeling_mcp_server/utils/comprehensive_exporter.py:147
↓ 2 callersFunctionconvert_threats_to_threat_composer_format
Convert threats to Threat Composer format. Args: threats: Dictionary of threat objects Returns: List of threats
threat_modeling_mcp_server/utils/comprehensive_exporter.py:100
↓ 2 callersFunctioncreate_enhanced_enum_error
Create an enhanced error message with current valid enum values. Args: invalid_value: The invalid value that was provided enu
threat_modeling_mcp_server/validation/enum_validator.py:99
↓ 2 callersFunctiondetect_code_in_directory
Detect if code files are present in the specified directory. Args: directory: Directory to check for code files file_patterns
threat_modeling_mcp_server/tools/threat_model_plan.py:9
↓ 2 callersFunctionexport_comprehensive_threat_model
Export comprehensive threat model to both Threat Composer JSON and Markdown formats. Args: output_path: Path to save the exported thr
threat_modeling_mcp_server/utils/comprehensive_exporter.py:283
↓ 2 callersFunctionextract_tools_from_module
Extract tool names from a module by inspecting the register_tools function. Args: module: The module to inspect Returns:
threat_modeling_mcp_server/validation/instruction_validator.py:13
↓ 2 callersFunctiongenerate_threat_model_markdown
Generate comprehensive threat model markdown content. Args: state: ThreatModelState containing all threat model data Ret
threat_modeling_mcp_server/utils/comprehensive_exporter.py:505
↓ 2 callersMethodget_default_actors
Get a set of default threat actors. Returns: A dictionary of default threat actors
threat_modeling_mcp_server/models/threat_actor_models.py:92
↓ 2 callersMethodget_default_assets
Get default assets.
threat_modeling_mcp_server/models/asset_flow_models.py:140
↓ 2 callersMethodget_default_flows
Get default asset flows.
threat_modeling_mcp_server/models/asset_flow_models.py:225
↓ 2 callersFunctionget_file_extension
Get the file extension from a file path. Args: file_path: Path to the file Returns: File extension without the d
threat_modeling_mcp_server/tools/code_security_validator.py:104
↓ 2 callersFunctionget_language_from_extension
Map file extension to programming language. Args: extension: File extension Returns: Programming language name
threat_modeling_mcp_server/tools/code_security_validator.py:117
↓ 2 callersFunctionget_state_summary
Get a summary of the current threat modeling state. Returns: Dictionary with counts and status of each state category
threat_modeling_mcp_server/utils/state_collector.py:91
↓ 2 callersFunctionlist_components_impl
List all components in the architecture. Args: ctx: MCP context for logging and error handling type: Optional type to filter
threat_modeling_mcp_server/tools/architecture_analyzer.py:134
↓ 2 callersFunctionmain
Run the threat modeling MCP server.
threat_modeling_mcp_server/server.py:240
↓ 2 callersFunctionupdate_mitigation_impl
Update an existing mitigation.
threat_modeling_mcp_server/tools/threat_generator.py:519
↓ 1 callersFunctionanalyze_code_with_llm
Generate a prompt for LLM to analyze code for security controls. Args: code_content: The code content to analyze file_path: P
threat_modeling_mcp_server/tools/code_security_validator.py:172
↓ 1 callersFunctionanalyze_threat_actors_impl
Analyze the threat actors. Args: ctx: MCP context for logging and error handling Returns: A markdown-formatted a
threat_modeling_mcp_server/tools/threat_actor_analyzer.py:359
↓ 1 callersFunctionclear_architecture_impl
Clear the architecture. Args: ctx: MCP context for logging and error handling Returns: A confirmation message
threat_modeling_mcp_server/tools/architecture_analyzer.py:771
↓ 1 callersFunctionclear_asset_flows_impl
Clear all assets and flows from the system. Args: ctx: MCP context for logging and error handling Returns: A con
threat_modeling_mcp_server/tools/asset_flow_analyzer.py:845
↓ 1 callersFunctionclear_business_context_impl
Clear the business context. Args: ctx: MCP context for logging and error handling Returns: A confirmation messag
threat_modeling_mcp_server/tools/business_context.py:491
↓ 1 callersFunctionclear_threat_actors_impl
Clear all threat actors. Args: ctx: MCP context for logging and error handling Returns: A confirmation message
threat_modeling_mcp_server/tools/threat_actor_analyzer.py:513
↓ 1 callersFunctionclear_trust_boundaries_impl
Clear all trust boundaries, crossing points, and trust zones. Args: ctx: MCP context for logging and error handling Retu
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:1268
↓ 1 callersFunctionconvert_business_context_to_dict
Convert business context to dictionary format. Args: business_context: BusinessContext object Returns: Dictionar
threat_modeling_mcp_server/utils/comprehensive_exporter.py:14
↓ 1 callersFunctionconvert_components_to_dict
Convert components to dictionary format. Args: components: Dictionary of component objects Returns: List of comp
threat_modeling_mcp_server/utils/comprehensive_exporter.py:177
↓ 1 callersFunctionconvert_connections_to_dict
Convert connections to dictionary format. Args: connections: Dictionary of connection objects Returns: List of c
threat_modeling_mcp_server/utils/comprehensive_exporter.py:204
↓ 1 callersFunctionconvert_data_stores_to_dict
Convert data stores to dictionary format. Args: data_stores: Dictionary of data store objects Returns: List of d
threat_modeling_mcp_server/utils/comprehensive_exporter.py:230
↓ 1 callersFunctiondelete_mitigation_impl
Delete a mitigation from the model.
threat_modeling_mcp_server/tools/threat_generator.py:571
↓ 1 callersFunctiondiscover_enum_classes
Dynamically discover all Enum classes in the imported modules. Returns: A dictionary mapping enum class names to enum classes
threat_modeling_mcp_server/tools/data_model_types.py:20
↓ 1 callersFunctionexecute_code_validation
Execute the complete code validation step. Args: ctx: MCP context for logging and error handling Returns: A mark
threat_modeling_mcp_server/tools/step_orchestrator.py:558
↓ 1 callersFunctionexecute_final_export
Execute the complete final export step. Args: ctx: MCP context for logging and error handling Returns: A markdow
threat_modeling_mcp_server/tools/step_orchestrator.py:574
↓ 1 callersFunctionextract_tools_from_instructions
Extract tool names from the instructions string. Args: instructions: The instructions string Returns: Set of too
threat_modeling_mcp_server/validation/instruction_validator.py:44
↓ 1 callersFunctionformat_threats_for_analysis
Format threats for LLM analysis context. Args: threats: List of threats to analyze Returns: Formatted string des
threat_modeling_mcp_server/tools/code_security_validator.py:150
↓ 1 callersFunctiongenerate_threat_modeling_plan
Generate a comprehensive threat modeling plan. This function returns a detailed threat modeling plan in markdown format, covering all phases
threat_modeling_mcp_server/tools/threat_model_plan.py:43
↓ 1 callersFunctiongenerate_tool_documentation
Generate documentation for all registered tools. Args: modules: List of tool modules Returns: Generated document
threat_modeling_mcp_server/validation/instruction_validator.py:116
↓ 1 callersFunctionget_architecture_analysis_plan_impl
Get a comprehensive architecture analysis plan. Args: ctx: MCP context for logging and error handling Returns: A
threat_modeling_mcp_server/tools/architecture_analyzer.py:596
↓ 1 callersFunctionget_asset_flow_analysis_plan_impl
Get a comprehensive asset flow analysis plan. Args: ctx: MCP context for logging and error handling Returns: A m
threat_modeling_mcp_server/tools/asset_flow_analyzer.py:624
↓ 1 callersFunctionget_asset_impl
Get details about a specific asset. Args: ctx: MCP context for logging and error handling id: ID of the asset to retrieve
threat_modeling_mcp_server/tools/asset_flow_analyzer.py:209
↓ 1 callersFunctionget_assumption_impl
Get details about a specific assumption. Args: ctx: MCP context for logging and error handling id: ID of the assumption to retrie
threat_modeling_mcp_server/tools/assumption_manager.py:91
↓ 1 callersFunctionget_business_context_analysis_plan
Get a comprehensive business context analysis plan. Returns: A markdown-formatted business context analysis plan with prompts for LLM
threat_modeling_mcp_server/tools/business_context.py:43
↓ 1 callersFunctionget_business_context_analysis_plan_impl
Get a comprehensive business context analysis plan. Args: ctx: MCP context for logging and error handling Returns:
threat_modeling_mcp_server/tools/business_context.py:562
↓ 1 callersFunctionget_business_context_features_impl
Get all business context features with descriptions. Args: ctx: MCP context for logging and error handling Returns:
threat_modeling_mcp_server/tools/business_context.py:511
↓ 1 callersFunctionget_business_context_impl
Get the business context. Args: ctx: MCP context for logging and error handling Returns: A markdown-formatted bu
threat_modeling_mcp_server/tools/business_context.py:434
↓ 1 callersFunctionget_crossing_point_impl
Get details about a specific crossing point. Args: ctx: MCP context for logging and error handling id: ID of the crossing poi
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:517
↓ 1 callersFunctionget_data_model_types_impl
Get available types for a data model. Args: ctx: MCP context for logging and error handling model_name: Name of the data mode
threat_modeling_mcp_server/tools/data_model_types.py:51
↓ 1 callersMethodget_default_crossing_points
Get a set of default crossing points. Returns: A dictionary of default crossing points
threat_modeling_mcp_server/models/trust_boundary_models.py:171
↓ 1 callersMethodget_default_trust_boundaries
Get a set of default trust boundaries. Returns: A dictionary of default trust boundaries
threat_modeling_mcp_server/models/trust_boundary_models.py:241
↓ 1 callersMethodget_default_trust_zones
Get a set of default trust zones. Returns: A dictionary of default trust zones
threat_modeling_mcp_server/models/trust_boundary_models.py:111
↓ 1 callersFunctionget_flow_impl
Get details about a specific asset flow. Args: ctx: MCP context for logging and error handling id: ID of the flow to retrieve
threat_modeling_mcp_server/tools/asset_flow_analyzer.py:542
↓ 1 callersFunctionget_mitigation_impl
Get details about a specific mitigation.
threat_modeling_mcp_server/tools/threat_generator.py:468
↓ 1 callersFunctionget_threat_actor_impl
Get details about a specific threat actor. Args: ctx: MCP context for logging and error handling id: ID of the threat actor t
threat_modeling_mcp_server/tools/threat_actor_analyzer.py:224
↓ 1 callersFunctionget_trust_boundary_analysis_plan_impl
Get a comprehensive trust boundary analysis plan with enforced AWS documentation validation. Args: ctx: MCP context for logging and e
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:950
↓ 1 callersFunctionget_trust_boundary_detection_plan_impl
Get a comprehensive trust boundary detection plan. Args: ctx: MCP context for logging and error handling Returns:
threat_modeling_mcp_server/tools/trust_boundary_detector.py:14
↓ 1 callersFunctionget_trust_boundary_impl
Get details about a specific trust boundary. Args: ctx: MCP context for logging and error handling id: ID of the trust bounda
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:866
↓ 1 callersFunctionget_trust_zone_impl
Get details about a specific trust zone. Args: ctx: MCP context for logging and error handling id: ID of the trust zone to re
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:175
↓ 1 callersFunctionlist_assets_impl
List all assets in the system. Args: ctx: MCP context for logging and error handling type: Optional type to filter assets
threat_modeling_mcp_server/tools/asset_flow_analyzer.py:144
↓ 1 callersFunctionlist_assumptions_impl
List all current assumptions in the threat model. Args: ctx: MCP context for logging and error handling category: Optional catego
threat_modeling_mcp_server/tools/assumption_manager.py:54
↓ 1 callersFunctionlist_connections_impl
List all connections in the architecture. Args: ctx: MCP context for logging and error handling component_id: Optional compon
threat_modeling_mcp_server/tools/architecture_analyzer.py:338
↓ 1 callersFunctionlist_crossing_points_impl
List all crossing points. Args: ctx: MCP context for logging and error handling zone_id: Optional trust zone ID to filter cro
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:448
↓ 1 callersFunctionlist_data_models_impl
List all available data models. Args: ctx: MCP context for logging and error handling Returns: A markdown-format
threat_modeling_mcp_server/tools/data_model_types.py:83
↓ 1 callersFunctionlist_data_stores_impl
List all data stores in the architecture. Args: ctx: MCP context for logging and error handling type: Optional type to filter
threat_modeling_mcp_server/tools/architecture_analyzer.py:525
↓ 1 callersFunctionlist_flows_impl
List all asset flows in the system. Args: ctx: MCP context for logging and error handling asset_id: Optional asset ID to filt
threat_modeling_mcp_server/tools/asset_flow_analyzer.py:472
↓ 1 callersFunctionlist_threat_actors_impl
List all threat actors. Args: ctx: MCP context for logging and error handling type: Optional type to filter threat actors
threat_modeling_mcp_server/tools/threat_actor_analyzer.py:159
↓ 1 callersFunctionlist_trust_boundaries_impl
List all trust boundaries. Args: ctx: MCP context for logging and error handling type: Optional type to filter trust boundari
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:797
↓ 1 callersFunctionlist_trust_zones_impl
List all trust zones. Args: ctx: MCP context for logging and error handling trust_level: Optional trust level to filter zones
threat_modeling_mcp_server/tools/trust_boundary_analyzer.py:121
next →1–100 of 448, ranked by callers