मुख्य सामग्री पर जाएं

Parameters

tool_name
string
आवश्यक
Tool का नाम जिसने यह result produce किया।
tool_result
string
आवश्यक
Tool से return हुआ raw output।
agent_context
string
Agent की role और current task की description।
redact_pii
boolean
डिफ़ॉल्ट:"true"
अगर true है, तो result का redacted version return करता है जिसमें PII placeholders से replace हो जाती है।

Request

curl -X POST https://api.responsibleailabs.ai/railscore/v1/agent/scan-tool-result \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_RAIL_API_KEY" \
  -d '{
    "tool_name": "search_database",
    "tool_result": "Customer John Smith (SSN: 123-45-6789) called on 2026-03-15.",
    "redact_pii": true
  }'

Response

{
  "result": {
    "pii_detected": true,
    "injection_detected": false,
    "risk_level": "medium",
    "pii_types": ["full_name", "ssn"],
    "redacted_result": "Customer [NAME] (SSN: [REDACTED]) called on 2026-03-15.",
    "recommendation": "warn"
  },
  "credits_consumed": 0.5
}
result.pii_detected
boolean
true अगर tool result में personally identifiable information मिली।
result.injection_detected
boolean
true अगर tool output में prompt injection attempt detect हुआ।
result.pii_types
string[]
Detect हुई PII के types: full_name, email, phone, ssn, credit_card, address, date_of_birth, etc.
result.redacted_result
string
Tool result जिसमें PII type placeholders से replace हो गई है। सिर्फ redact_pii=true होने पर मिलता है।
result.recommendation
string
Suggested action: "allow", "warn", या "block"