Mehdi Akiki
Writing

Rust AI tool boundaries

Carry identity, permissions, approval, and resource limits to the place effects happen. Each guide gives a concrete reproduction, the resulting decision, and the limits of the evidence.

  1. A denied tool call must leave no side effect

    An error response does not prove that a tool did nothing. Validate and authorize before effects, then assert unchanged storage and zero external calls after rejection.

  2. Even a trusted tool needs an output limit

    Bound tool results before they become model context or logs. Use explicit pagination or overflow errors so partial data cannot look like a complete answer.