What Is a Tool Manifest?
A tool manifest is a declarative mapping from tool names to permission levels for a specific connector. It tells Grantex exactly which permission is required to call each tool, so enforcement does not have to guess from tool name keywords.create_lead, Grantex looks up the manifest, sees that create_lead requires write permission, and checks whether the agent’s grant token includes a scope that covers write on the salesforce connector.
The Permission Hierarchy
Grantex defines four permission levels in a strict hierarchy. Higher levels subsume all lower levels:Coverage Rules
A scope grants access to all tools at or below its permission level:
Example: An agent with
tool:salesforce:write:* can call query (read) and create_lead (write) but cannot call delete_contact (delete) or run_period_close (admin).
Scope Format
Tool enforcement scopes follow the format:Examples
How enforce() Uses Manifests
When you callenforce(), Grantex performs these steps:
- Decode the JWT — extract
scp(scopes),grnt/jti(grant ID),agt(agent DID) - Look up the manifest — find the loaded manifest for the given connector
- Resolve the permission — look up the tool name in the manifest to get its required permission level
- Check coverage — determine if any scope in the token covers the required permission on this connector
- Check caps — if the scope is capped and an amount was provided, verify the amount is within the cap
- Return the result —
allowed: trueorallowed: falsewith a reason
Defining Manifests
Grantex enforces permissions on any connector you define — not just the ones we ship. You own the manifest, you own the permission mapping.Custom Manifests
Define a manifest for any tool, API, or internal service. No dependency on Grantex to add support:- Inline — define in code with
ToolManifest(...):
- JSON file — load from disk with
ToolManifest.from_file("./manifests/my-service.json") - Directory — load all manifests from a folder with
grantex.load_manifests_from_dir("./manifests/") - Extend — add tools to any manifest with
manifest.add_tool("new_tool", Permission.WRITE) - CLI generate — auto-generate manifests from source code with
grantex manifest generate agent_tools.py
Pre-Built Manifests
As a convenience, Grantex ships 53 pre-built manifests covering 339 tools across five categories:
Import and load them directly:
Fail-Closed Default
Ifenforce() is called with a connector or tool that has no manifest loaded, the call is denied by default:
JSON Manifest File Format
When storing manifests as files (for git, CI, or team sharing), use this JSON format:Related
- Custom Manifests guide — define manifests for any connector
- Scope Enforcement guide — end-to-end walkthrough
- Scopes concept — the
resource:action[:constraint]scope format - TypeScript SDK enforce() — API reference
- Python SDK enforce() — API reference
- CLI manifest commands — browse and validate manifests
- AgenticOrg case study — 53 pre-built + custom manifests enforced in production