Most teams start with the obvious version of multi-tenant tool calling: put tenant_id in the tool schema, let the model fill it in, and validate it server-side against the caller's entitlement. That looks rigorous. It is the wrong layer.
The reason is a property of LLM agents that does not apply to ordinary programs. In a deterministic service, the arguments in a request are fixed by source code, so a tenant parameter is a convenience and validating it is sufficient. An agent instead produces arguments from a context window that, in any realistic deployment, is partly attacker-reachable through direct or indirect prompt injection. The paper that formalizes this calls the result a stochastic deputy: a deputy that holds broad delegated authority, selects which resource to use through a non-deterministic process, and cannot reliably separate instructions from data (Baig et al., The Stochastic Deputy). If the tenant identifier is a tool parameter, the effective authority of the request is bounded by the model's prompt, not by the credential.
The measured consequence is blunt. In a 373-trial ablation across eight model configurations and two transports, a correctly validated tenant parameter served every out-of-scope attempt: 26 of 26, or 26 of 41 plausible-pretext trials overall. When the parameter was removed from the schema, no tool signature could express the read at all (arXiv, structural tenant isolation). The validator did its job faithfully every time. The specification was the vulnerability.
So the design rule is short: the tenant id must originate in a credential the model cannot write to. Everything downstream, including the tests, is easier once you accept that.



