PermissionDenied Module
Canonical, structured refusal handed back to the model whenever a resource access is denied. Centralizing it here keeps every enforcement point (a tool's own declared permissions, the runtime context, the server guard) emitting the same machine-readable shape — `{ error, kind, resource, message, hint? }` — so agents can relay denials consistently. The optional hint lets the server add UI-specific guidance.
Functions and values
| Function or value |
Description
|
Full Usage:
PermissionDenied.format access hint
Parameters:
ResourceAccess
hint : string option
Returns: string
|
Build the structured refusal JSON for a denied access, optionally with a remediation hint (e.g. how to grant the access in Settings).
|
Nao