serv_prompt_guard to the same tools array as your application tools.
How the guard works
The guard is an input-side safety check. SERV evaluates the generated reasoning prompt against the user-controlled request context. If the judge identifies an injection attempt, SERV returns an endpoint-shaped refusal and does not call the requested upstream model. The guard is opt-in. The marker enables it, but the model never sees or calls the marker. You do not need to implement a function handler.Where to use it
Use the guard for assistants with sensitive system prompts, private policies, or routing rules. Keep authorization, access checks, secret handling, and tool permissions in your application. Do not place credentials in a prompt. The guard adds an inference step, latency, and cost. Enable it on requests that handle protected instructions, then measure false positives with your own prompts. If SERV cannot arm the guard, it returns a502; retry the request. If the guard is armed but the judge call fails, SERV still calls the requested model without a verdict, so a normal response does not confirm that the request was screened. See serv_prompt_guard for the full failure behavior.
After guarded requests run, open the Safety report to review Guard results, blocked requests, and reported false positives.
