Skip to main content
Glama
enkryptai

Enkrypt AI MCP Server

Official
by enkryptai

add_redteam_task

Create a red-team task using a saved model to evaluate AI safety. Specify model version, configuration, and tests such as bias, toxicity, and harmful content to analyze vulnerabilities and ensure robust AI performance.

Instructions

Add a redteam task using a saved model.

Args: model_saved_name: The saved name of the model to be used for the redteam task. model_version: The version of the model to be used for the redteam task. redteam_model_config: The configuration for the redteam task. Example usage: sample_redteam_model_config = { "test_name": redteam_test_name, "dataset_name": "standard", "redteam_test_configurations": { #IMPORTANT: Before setting the redteam test config, ask the user which tests they would want to run and the sample percentage. "bias_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "cbrn_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "insecure_code_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "toxicity_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "harmful_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, }, } These are the only 5 tests available. Ask the user which ones to run and sample percentage for each as well.

    Before calling this tool, ensure that the model name is availble. If not, save a new model then start the redteaming task.

    NOTE: Tests compatible with audio and image modalities are only: cbrn and harmful. Other test types are not compatible with audio and image modalities.

Returns: A dictionary containing the response message and details of the added redteam task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_saved_nameYes
model_versionYes
redteam_model_configYes

Implementation Reference

  • The main handler function for the 'add_redteam_task' MCP tool. It is registered via the @mcp.tool() decorator and implements the tool logic by calling the redteam_client.add_task_with_saved_model API with the provided model details and configuration, returning the response as a dictionary. The docstring provides detailed input schema and usage examples.
    @mcp.tool()
    def add_redteam_task(model_saved_name: str, model_version: str, redteam_model_config: Dict[str, Any]) -> Dict[str, Any]:
        """
        Add a redteam task using a saved model.
    
        Args:
            model_saved_name: The saved name of the model to be used for the redteam task.
            model_version: The version of the model to be used for the redteam task.
            redteam_model_config: The configuration for the redteam task.
                Example usage:
                    sample_redteam_model_config = {
                    "test_name": redteam_test_name,
                    "dataset_name": "standard",
                    "redteam_test_configurations": { #IMPORTANT: Before setting the redteam test config, ask the user which tests they would want to run and the sample percentage.
                        "bias_test": {
                            "sample_percentage": 2,
                            "attack_methods": {"basic": ["basic"]},
                        },
                        "cbrn_test": {
                            "sample_percentage": 2,
                            "attack_methods": {"basic": ["basic"]},
                        },
                        "insecure_code_test": {
                            "sample_percentage": 2,
                            "attack_methods": {"basic": ["basic"]},
                        },
                        "toxicity_test": {
                            "sample_percentage": 2,
                            "attack_methods": {"basic": ["basic"]},
                        },
                        "harmful_test": {
                            "sample_percentage": 2,
                            "attack_methods": {"basic": ["basic"]},
                        },
                    },
                }
                These are the only 5 tests available. Ask the user which ones to run and sample percentage for each as well.
    
                Before calling this tool, ensure that the model name is availble. If not, save a new model then start the redteaming task.
    
                NOTE: Tests compatible with audio and image modalities are only: cbrn and harmful. Other test types are not compatible with audio and image modalities.
    
        Returns:
            A dictionary containing the response message and details of the added redteam task.
        """
        # Use a dictionary to configure a redteam task
        add_redteam_model_response = redteam_client.add_task_with_saved_model(config=redteam_model_config, model_saved_name=model_saved_name, model_version=model_version)
    
        # Print as a dictionary
        return add_redteam_model_response.to_dict()
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it's a creation/mutation tool (implied by 'Add'), requires model availability checks, involves user interaction for configuration, and returns a dictionary with response details. It also mentions modality constraints, which adds useful context. However, it doesn't cover aspects like error handling, rate limits, or authentication needs, leaving some gaps.

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

Conciseness3/5

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

The description is front-loaded with the core purpose, but it includes verbose example code and repetitive instructions (e.g., repeating 'sample_percentage' notes). While the content is valuable, the structure could be more streamlined—some sentences could be condensed without losing clarity, and the example could be referenced more succinctly.

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?

Given the complexity (3 parameters, nested objects, no output schema, no annotations), the description does a strong job of covering context. It explains parameters thoroughly, provides usage prerequisites, notes modality constraints, and describes the return value. However, without an output schema, it doesn't detail the structure of the returned dictionary (e.g., specific keys or data types), which is a minor gap in completeness.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must fully compensate. It provides detailed semantics for all three parameters: 'model_saved_name' and 'model_version' are explained, and 'redteam_model_config' receives extensive documentation with an example structure, test types, and usage notes. This adds significant value beyond the bare schema, fully explaining what each parameter means and how to use them.

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 tool's purpose: 'Add a redteam task using a saved model.' It specifies the verb ('Add'), resource ('redteam task'), and constraint ('using a saved model'), which is clear and specific. However, it doesn't explicitly differentiate from sibling tools like 'add_agent_redteam_task' or 'add_custom_redteam_task', which would be needed for a perfect score.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool, including prerequisites ('ensure that the model name is available'), alternatives ('save a new model then start the redteaming task'), and context-specific instructions ('Before setting the redteam test config, ask the user which tests they would want to run and the sample percentage'). It also notes modality compatibility ('Tests compatible with audio and image modalities are only: cbrn and harmful'), which helps distinguish appropriate use cases.

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

Related 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/enkryptai/enkryptai-mcp-server'

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