Skip to main content
Glama

Enkrypt AI MCP Server

Official
by enkryptai

retrieve_policy_configuration

Retrieve policy configuration details by specifying the policy name, enabling access to structured policy data for analysis and implementation.

Instructions

Retrieve and print the policy configuration for a given policy name.

Args: policy_name: The name of the policy to retrieve.

Returns: A dictionary containing the policy configuration.

Input Schema

NameRequiredDescriptionDefault
policy_nameYes

Input Schema (JSON Schema)

{ "properties": { "policy_name": { "title": "Policy Name", "type": "string" } }, "required": [ "policy_name" ], "title": "retrieve_policy_configurationArguments", "type": "object" }

Implementation Reference

  • The handler function for the 'retrieve_policy_configuration' tool, decorated with @mcp.tool() for registration. It retrieves the policy using guardrails_client.get_policy and returns a dictionary with policy details, name, and detectors.
    @mcp.tool() def retrieve_policy_configuration(policy_name: str) -> Dict[str, Any]: """ Retrieve and print the policy configuration for a given policy name. Args: policy_name: The name of the policy to retrieve. Returns: A dictionary containing the policy configuration. """ policy = guardrails_client.get_policy(policy_name=policy_name) # Return policy details as a dictionary return { "policy": policy.to_dict(), "name": policy.name, "detectors": policy.detectors.to_dict() }

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