Skip to main content

Parameters

tool_name
string
required
Name of the tool being called.
tool_params
object
required
Parameters being passed to the tool.
agent_context
object
The agent’s role and current task. Object with optional fields: goal (string), prior_tool_calls (array of objects), agent_id (string), turn_index (integer).
domain
string
default:"general"
Domain hint used to tune evaluation (e.g. finance, healthcare).
mode
string
default:"basic"
Evaluation depth: basic or deep.
compliance_frameworks
string[]
Frameworks to check the call against (e.g. india_dpdp, gdpr).
custom_thresholds
object
Override decision thresholds. Object with optional fields: block_below (number 0-10), flag_below (number 0-10), dimension_minimums (object of dimension → minimum score).

Request

curl -X POST https://api.responsibleailabs.ai/railscore/v1/agent/tool-call \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_RAIL_API_KEY" \
  -d '{
    "tool_name": "send_email",
    "tool_params": {"to": "admin@company.com", "body": "Click: http://suspicious.com"},
    "agent_context": {"goal": "Customer support chatbot resolving a ticket"}
  }'

Response

{
  "decision": "BLOCK",
  "decision_reason": "Suspicious URL detected in email body.",
  "event_id": "evt_1a2b3c4d",
  "rail_score": {"score": 2.4, "confidence": 0.82, "summary": "High-risk tool call."},
  "dimension_scores": {"safety": {"score": 2.1}},
  "compliance_violations": [],
  "suggested_params": null,
  "policy": {"block_below": 3.0, "flag_below": 5.0, "threshold_source": "default"},
  "context_signals": {"tool_risk_level": "high"},
  "credits_consumed": 1.0,
  "evaluation_depth": "basic",
  "evaluated_at": "2026-06-25T10:00:00Z"
}
decision
string
"ALLOW", "FLAG", or "BLOCK". A BLOCK decision returns HTTP 403; ALLOW/FLAG return 200.
decision_reason
string
Human-readable explanation for the decision.
rail_score
object
score (0-10), confidence (0-1), and a summary string.
suggested_params
object
Safer parameter values when the engine can propose them, otherwise null.