grantex
v0.1.9OAuth 2.0 for AI agents — scoped delegation tokens, audit trails, and revocation.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
grantex_agent_register
Register a new AI agent with Grantex
| Parameter | Type | Description |
|---|---|---|
description * | string | What this agent does |
name * | string | Human-readable agent name |
scopes * | array | Requested permission scopes |
grantex_agent_list
List all registered agents
grantex_agent_get
Get details for a specific agent
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Agent ID (ag_...) |
grantex_agent_update
Update an existing agent
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Agent ID (ag_...) |
description | string | New agent description |
name | string | New agent name |
scopes | array | New requested scopes |
grantex_agent_delete
Delete an agent
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Agent ID to delete (ag_...) |
grantex_authorize
Start an authorization flow — returns a consent URL for the user to approve
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Agent ID (ag_...) |
scopes * | array | Scopes to request |
userId * | string | Your application user identifier |
expiresIn | string | Grant lifetime (e.g. "24h", "7d") |
redirectUri | string | Callback URL after consent |
grantex_token_exchange
Exchange authorization code for grant token
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Agent ID (ag_...) |
code * | string | Authorization code from consent callback |
grantex_token_verify
Verify a grant token and inspect its claims
| Parameter | Type | Description |
|---|---|---|
token * | string | JWT grant token to verify |
grantex_token_revoke
Revoke a grant token by its JTI
| Parameter | Type | Description |
|---|---|---|
tokenId * | string | Token JTI to revoke |
grantex_token_refresh
Refresh a grant token using a refresh token (single-use rotation)
| Parameter | Type | Description |
|---|---|---|
agentId * | string | Agent ID (ag_...) |
refreshToken * | string | Refresh token from a previous token exchange |
grantex_grant_list
List grants with optional filters
| Parameter | Type | Description |
|---|---|---|
agentId | string | Filter by agent ID |
principalId | string | Filter by principal (user) ID |
status | string | Filter by status |
grantex_grant_get
Get details for a specific grant
| Parameter | Type | Description |
|---|---|---|
grantId * | string | Grant ID (grnt_...) |
grantex_grant_revoke
Revoke an active grant
| Parameter | Type | Description |
|---|---|---|
grantId * | string | Grant ID to revoke |
grantex_grant_delegate
Delegate a grant to a sub-agent with narrowed scopes
| Parameter | Type | Description |
|---|---|---|
parentGrantToken * | string | JWT grant token of the parent agent |
scopes * | array | Scopes for the delegated grant (must be subset of parent) |
subAgentId * | string | Sub-agent ID to delegate to (ag_...) |
expiresIn | string | Delegation lifetime (e.g. "1h") |
grantex_audit_log
Log an audit entry for an agent action
| Parameter | Type | Description |
|---|---|---|
action * | string | Action name (e.g. "read_email", "send_message") |
agentDid * | string | Agent DID (e.g. "did:key:z6Mk...") |
agentId * | string | Agent ID that performed the action |
grantId * | string | Grant ID authorizing the action |
principalId * | string | Principal ID (user) that granted authorization |
metadata | object | Additional context |
status | string | Outcome status |
grantex_audit_list
List audit entries with optional filters
| Parameter | Type | Description |
|---|---|---|
action | string | Filter by action name |
agentId | string | Filter by agent ID |
grantId | string | Filter by grant ID |
since | string | Start date (ISO 8601) |
until | string | End date (ISO 8601) |
grantex_principal_session_create
Create a principal session for end-user permission management
| Parameter | Type | Description |
|---|---|---|
principalId * | string | Principal (end-user) ID |
expiresIn | string | Session lifetime (e.g. "1h", "30m") |