NylorunDocsBeta
Management APITool policy

Get the Tenant's tool policy

GET
/v1/tenant/tool-policy

Authorization

managementKey
headerAuthorizationBearer <token>

A management key of the Tenant (role management): it reaches the Management API (/v1/tenant/*) and /v1/me, as itself, never for a subject. Issued only on the Tenant's machine (nylorun-operate keys put <id> --role management) or from NYLORUN_MANAGEMENT_KEY_FILE. Never accepted from a browser (Origin).

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Response Body

The rules the Tool Gate applies to every MCP and HTTP tool call

application/json
  1. response
rules*array<>
updatedAt*string|null
import { createAdmin } from "@nylorun/admin";const admin = createAdmin();const policy = await admin.toolPolicy.get();
{  "rules": [    {      "effect": "allow",      "tool": "string",      "server": "string",      "kind": "mcp",      "agent": "string",      "when": {        "property1": {          "equals": "string",          "in": [            "string"          ],          "gt": 0,          "gte": 0,          "lt": 0,          "lte": 0,          "matches": "string"        },        "property2": {          "equals": "string",          "in": [            "string"          ],          "gt": 0,          "gte": 0,          "lt": 0,          "lte": 0,          "matches": "string"        }      },      "reason": "string"    }  ],  "updatedAt": "string"}