> ## Documentation Index
> Fetch the complete documentation index at: https://docs.responsibleailabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent: Bewertung des Toolaufrufs

> POST /railscore/v1/agent/tool-call -- Bewerten Sie einen Toolaufruf vor der Ausführung.

<Info>
  **Konzept:** [Agentenbewertung](/concepts/agent-evaluation) | **Python:** [`client.agent.evaluate_tool_call()`](/sdk/python/agent-evaluation)
</Info>

## Parameter

<ParamField body="tool_name" type="string" required>
  Name des aufgerufenen Tools.
</ParamField>

<ParamField body="tool_params" type="object" required>
  Parameter, die an das Tool übergeben werden.
</ParamField>

<ParamField body="agent_context" type="object">
  Die Rolle des Agenten und aktuelle Aufgabe. Ein Objekt mit optionalen Feldern: `goal` (String), `prior_tool_calls` (Array von Objekten), `agent_id` (String), `turn_index` (Integer).
</ParamField>

<ParamField body="domain" type="string" default="general">
  Domain-Hinweis zur Abstimmung der Bewertung (z. B. `finance`, `healthcare`).
</ParamField>

<ParamField body="mode" type="string" default="basic">
  Bewertungstiefe: `basic` oder `deep`.
</ParamField>

<ParamField body="compliance_frameworks" type="string[]">
  Compliance-Frameworks, gegen die der Aufruf überprüft wird (z. B. `india_dpdp`, `gdpr`).
</ParamField>

<ParamField body="custom_thresholds" type="object">
  Entscheidungsschwellenwerte überschreiben. Objekt mit optionalen Feldern: `block_below` (Zahl 0–10), `flag_below` (Zahl 0–10), `dimension_minimums` (Objekt aus Dimension → Mindestscore).
</ParamField>

## Anfrage

```bash theme={null}
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"}
  }'
```

## Antwort

```json theme={null}
{
  "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"
}
```

<ResponseField name="decision" type="string">
  `"ALLOW"`, `"FLAG"` oder `"BLOCK"`. Eine `BLOCK`-Entscheidung gibt HTTP 403 zurück; `ALLOW`/`FLAG` geben 200 zurück.
</ResponseField>

<ResponseField name="decision_reason" type="string">
  Verständliche Erklärung für die Entscheidung.
</ResponseField>

<ResponseField name="rail_score" type="object">
  `score` (0–10), `confidence` (0–1) und eine `summary`-Zeichenfolge.
</ResponseField>

<ResponseField name="suggested_params" type="object">
  Sicherere Parameterwerte, wenn das Modul diese vorschlagen kann, sonst `null`.
</ResponseField>
