跳转到主要内容

Parameters

tool_name
string
必填
Name of the tool being called.
tool_input
object
必填
Parameters being passed to the tool.
agent_context
string
Description of the agent’s role and current task.
allowed_tools
string[]
Whitelist of permitted tool names.

Request

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

Response

{
  "result": {
    "safe": false,
    "risk_level": "high",
    "risk_score": 0.89,
    "explanation": "Suspicious URL detected in email body.",
    "flags": [{"type": "suspicious_url", "detail": "Domain mismatch"}],
    "recommendation": "block"
  },
  "credits_consumed": 1.0
}
result.safe
boolean
Whether the tool call is safe to execute.
result.risk_level
string
"low", "medium", or "high".
result.recommendation
string
"allow", "warn", or "block".