Skip to main content
Glama
enkryptai

Enkrypt AI MCP Server

Official
by enkryptai

add_guardrails_policy

Add a guardrails policy to enforce AI safety measures by configuring detectors for injection attacks, PII, NSFW content, toxicity, bias, and more. Define custom settings for each detector to ensure compliance with specified security and content guidelines.

Instructions

Add a new guardrails policy.

Args: policy_name: The name of the policy to add. detectors: detectors_config: Dictionary of detector configurations. Each key should be the name of a detector, and the value should be a dictionary of settings for that detector. Available detectors and their configurations are as follows:

                  - injection_attack: Configured using InjectionAttackDetector model. Example: {"enabled": True}
                  - pii: Configured using PiiDetector model. Example: {"enabled": False, "entities": ["email", "phone"]}
                  - nsfw: Configured using NsfwDetector model. Example: {"enabled": True}
                  - toxicity: Configured using ToxicityDetector model. Example: {"enabled": True}
                  - topic: Configured using TopicDetector model. Example: {"enabled": True, "topic": ["politics", "religion"]}
                  - keyword: Configured using KeywordDetector model. Example: {"enabled": True, "banned_keywords": ["banned_word1", "banned_word2"]}
                  - policy_violation: Configured using PolicyViolationDetector model. Example: {"enabled": True, "need_explanation": True, "policy_text": "Your policy text here"}
                  - bias: Configured using BiasDetector model. Example: {"enabled": True}
                  - copyright_ip: Configured using CopyrightIpDetector model. Example: {"enabled": True}
                  - system_prompt: Configured using SystemPromptDetector model. Example: {"enabled": True, "index": "system_prompt_index"}
                  
                  Example usage: 
                  {
                      "injection_attack": {"enabled": True}, 
                      "nsfw": {"enabled": True}
                  }

Returns: A dictionary containing the response message and policy details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detectorsYes
policy_descriptionYes
policy_nameYes
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It describes the action ('Add a new guardrails policy') and return format, but lacks critical behavioral details such as permission requirements, whether this is a mutating operation, error conditions, or system impacts. The example usage helps but doesn't cover behavioral traits comprehensively.

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 appropriately front-loaded with the core purpose, but becomes verbose with extensive detector examples. While the examples are helpful, they could be more efficiently structured. Some sentences (like the detailed detector list) could be condensed without losing clarity.

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 complexity (3 parameters with nested objects, no annotations, no output schema), the description does a reasonable job but has gaps. It covers parameters well and mentions the return format, but lacks behavioral context and doesn't explain the 'policy_description' parameter. For a tool that creates policies, more context about system impact would be beneficial.

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?

With 0% schema description coverage, the description compensates exceptionally well by providing detailed parameter semantics. It explains 'policy_name' and 'detectors' thoroughly, including available detector types, configuration models, and comprehensive examples. This adds significant value beyond the bare schema.

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 'Add' and the resource 'guardrails policy', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'update_guardrails_policy' or 'mitigation_guardrails_policy', 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 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 like 'update_guardrails_policy' or 'remove_guardrails_policy'. The description only explains what the tool does, not when it should be selected over other tools in the context of the sibling list.

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