Overview
grantex enforce test lets you dry-run scope enforcement against a real grant token without writing any code. Pass a token, connector, and tool name to see whether the call would be allowed or denied, and why.
Prefer a secret-safe token source for agent automation:
Use --token-file <path> or --token-stdin as alternatives. Allowed decisions exit 0; denied or invalid decisions exit non-zero, including with --json.
grantex enforce test
Test whether a grant token permits a specific tool call.
Allowed Example
Denied Example
Capped Scopes
Use the --amount flag to test enforcement against capped scopes:
When within the cap:
JSON Output
Use --json for machine-readable output, useful for scripting and CI pipelines:
Allowed result:
Options
Exit Codes
Last modified on August 10, 2026