grantex

v0.1.9
io.github.mishrasanjeev/grantex Checked 9 hours ago Published 7 months ago

OAuth 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

ParameterTypeDescription
description *stringWhat this agent does
name *stringHuman-readable agent name
scopes *arrayRequested permission scopes

grantex_agent_list

List all registered agents

grantex_agent_get

Get details for a specific agent

ParameterTypeDescription
agentId *stringAgent ID (ag_...)

grantex_agent_update

Update an existing agent

ParameterTypeDescription
agentId *stringAgent ID (ag_...)
descriptionstringNew agent description
namestringNew agent name
scopesarrayNew requested scopes

grantex_agent_delete

Delete an agent

ParameterTypeDescription
agentId *stringAgent ID to delete (ag_...)

grantex_authorize

Start an authorization flow — returns a consent URL for the user to approve

ParameterTypeDescription
agentId *stringAgent ID (ag_...)
scopes *arrayScopes to request
userId *stringYour application user identifier
expiresInstringGrant lifetime (e.g. "24h", "7d")
redirectUristringCallback URL after consent

grantex_token_exchange

Exchange authorization code for grant token

ParameterTypeDescription
agentId *stringAgent ID (ag_...)
code *stringAuthorization code from consent callback

grantex_token_verify

Verify a grant token and inspect its claims

ParameterTypeDescription
token *stringJWT grant token to verify

grantex_token_revoke

Revoke a grant token by its JTI

ParameterTypeDescription
tokenId *stringToken JTI to revoke

grantex_token_refresh

Refresh a grant token using a refresh token (single-use rotation)

ParameterTypeDescription
agentId *stringAgent ID (ag_...)
refreshToken *stringRefresh token from a previous token exchange

grantex_grant_list

List grants with optional filters

ParameterTypeDescription
agentIdstringFilter by agent ID
principalIdstringFilter by principal (user) ID
statusstringFilter by status

grantex_grant_get

Get details for a specific grant

ParameterTypeDescription
grantId *stringGrant ID (grnt_...)

grantex_grant_revoke

Revoke an active grant

ParameterTypeDescription
grantId *stringGrant ID to revoke

grantex_grant_delegate

Delegate a grant to a sub-agent with narrowed scopes

ParameterTypeDescription
parentGrantToken *stringJWT grant token of the parent agent
scopes *arrayScopes for the delegated grant (must be subset of parent)
subAgentId *stringSub-agent ID to delegate to (ag_...)
expiresInstringDelegation lifetime (e.g. "1h")

grantex_audit_log

Log an audit entry for an agent action

ParameterTypeDescription
action *stringAction name (e.g. "read_email", "send_message")
agentDid *stringAgent DID (e.g. "did:key:z6Mk...")
agentId *stringAgent ID that performed the action
grantId *stringGrant ID authorizing the action
principalId *stringPrincipal ID (user) that granted authorization
metadataobjectAdditional context
statusstringOutcome status

grantex_audit_list

List audit entries with optional filters

ParameterTypeDescription
actionstringFilter by action name
agentIdstringFilter by agent ID
grantIdstringFilter by grant ID
sincestringStart date (ISO 8601)
untilstringEnd date (ISO 8601)

grantex_principal_session_create

Create a principal session for end-user permission management

ParameterTypeDescription
principalId *stringPrincipal (end-user) ID
expiresInstringSession lifetime (e.g. "1h", "30m")