Skip to content

Reference

lg_guardrails_set: Tighten guardrails

Markdown version

Change guardrails on the organization, a workspace or a key. As an agent you may only make them stricter; loosening is done by a person in the web app.

  • Changes data: yes
  • Credential scope: gateway:write (an API key's scopes, or what you allowed when connecting with OAuth)
  • Assistant level: an assistant at Full; a lower level is refused

Inputs

FieldTypeRequiredNotes
scopestringyes
idstringyes
bodyobject (allowed_models, denied_models, allowed_providers, denied_providers, data_collection, zdr, eu_only, sensitive_info, prompt_injection)no
body.allowed_modelsarray of string or nullno
body.denied_modelsarray of stringno
body.allowed_providersarray of string or nullno
body.denied_providersarray of stringno
body.data_collection"allow" | "deny"no
body.zdrbooleanno
body.eu_onlybooleannoOnly endpoints in the EU
body.sensitive_info"off" | "log" | "redact" | "block"noSecrets, card numbers, personal data: log, redact before sending, or refuse
body.prompt_injection"off" | "log" | "block"no

Example MCP call

A tools/call request to https://manage.restolayer.com/mcp:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_guardrails_set",
    "arguments": {
      "scope": "key",
      "id": "gk_01jabcdefghjkmnpqrstvwxyz0",
      "body": {
        "eu_only": true,
        "sensitive_info": "redact"
      }
    }
  }
}

Example REST call

The same thing over REST (PUT /v1/guardrails/:scope/:id):

curl -s -X PUT "https://manage.restolayer.com/v1/guardrails/key/gk_01jabcdefghjkmnpqrstvwxyz0" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"eu_only":true,"sensitive_info":"redact"}'

All tools: MCP tools. Connecting: connect your assistant.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.