The outcome

Use hosted and custom tools without prompt-injection escalation, cross-tenant access, duplicate side effects, or leaked credentials.

Step by step

A workflow you can repeat.

  1. 01

    Define an allowlist of narrow tools, user and tenant roles, data boundaries, schemas, side effects, approval thresholds, budgets, retries, stopping conditions, and audit fields.

  2. 02

    Keep project keys server-side, send a stable privacy-preserving safety identifier for end users, minimize context, and never place credentials or unrestricted URLs in prompts or tool descriptions.

  3. 03

    Parse tool calls as untrusted, reject unknown names and fields, canonicalize inputs, reauthorize against current server state, and require explicit confirmation for consequential or external writes.

  4. 04

    Execute through scoped service accounts with idempotency, timeouts, rate and spend limits, sandbox code and computer use, and return bounded results with no secrets or excessive records.

  5. 05

    Test direct and indirect injection, confused deputy, tenant crossover, forged IDs, replay, parallel calls, exfiltration, denial, provider failure, safeguard intervention, cancellation, and rollback.

Working standard

What good use looks like.

  • Authorize every action outside the model.
  • Make side effects idempotent.
  • Require approval for consequential tools.

Official references

Check the current product documentation.