rail_-prefixed. Each description tells the agent what the tool
does, when to use it, when not to, its cost, and its latency.
Evaluation and guardrails
rail_evaluate
Score AI-generated content across the 8 RAIL dimensions (Fairness, Safety,
Reliability, Transparency, Privacy, Accountability, Inclusivity, User Impact).
basic is ~1 credit and under 1s; deep is ~3 credits and 2–5s and adds
explanations, issues, and suggestions.
Policy enforcement
Pass an optionalpolicy to enforce per-dimension thresholds inline — the same
Policy/Rule model as the SDK. A rule fires when its dimension scores below
the threshold.
policy_outcome:
action is the most severe fired action (block > flag > warn > allow).
Precedence: if the API key’s application has a dashboard policy enforced,
that wins (source: "application"); otherwise the request policy is applied
(source: "request"). No extra credits beyond the eval mode. Fetch the
rail://framework/policy-schema resource for the full JSON Schema.
rail_check_compliance
Check content against regulatory frameworks: gdpr, ccpa, hipaa,
eu_ai_act, india_dpdp, india_ai_gov. Up to 5 per call with a cross-framework
summary. 5–10 credits.
rail_detect_injection
Detect prompt injection in untrusted text before acting on it. Returns the
verdict only — never the analyzed text. 0.5 credits, under 500ms.
rail_evaluate_tool_call
Evaluate a proposed tool call before executing it. Returns allow, warn, or
block. Treat block as a hard stop. 1.5–3.0 credits.
rail_scan_tool_result
Scan a tool’s output for PII and second-order injection. Returns a verdict, PII
types and offsets, and a redacted copy of the text — never raw values. 0.5–1.0
credits.
rail_safe_regenerate
Evaluate content and, if it scores below threshold, iteratively regenerate it
server-side until it passes (up to 5 iterations). Slow: tens of seconds, 1–9
credits.
India DPDP
rail_dpdp_scan
Scan text for Indian personal data under the DPDP Act 2023: Aadhaar
(Verhoeff-validated), PAN, mobile, UPI, passport, voter ID, driving license,
IFSC, bank account, GSTIN, plus child signals and purpose drift.
detect returns findings with offsets and masked values only; mask returns
the masked text; block returns a verdict.
rail_dpdp_gate
Real-time DPDP processing gate. Returns allow, block, or require_action
enforcing child protection, cross-border transfer rules, and consent.
rail_dpdp_compliance
DPDP workflow operations selected by action:
Sessions are isolated per API key.
Resources
Free, read-only, zero credits:rail://framework/dimensions— the 8 dimensions with definitions and the weights/thresholds configured for your application.rail://account/capabilities— your plan, enabled features, modes, frameworks, and limits.rail://framework/policy-schema— the JSON Schema for thepolicyparameter (valid dimensions, threshold range, actions), so agents can build valid policies without trial and error.
Errors
Tool errors are structured (a JSON object with acode), never prose, so agents
can branch on them:
Block-style verdicts (e.g.
rail_evaluate_tool_call returning block) are
returned as normal result data, not errors — only genuine failures use the codes
above.