TracePass access grants
tracepass_access_grantsShare restricted passport data with a partner (repairer, recycler, purchaser...) through an access grant, and see or end the grants already issued. A grant names a role, a scope (company, chosen products or chosen passports), a purpose, optional evidence and an expiry (default 12 months). Needs an OAuth connection approved for access grants or an API key with "May manage access grants" switched on (403 access_grants_not_enabled); writing needs an admin. Authority roles (e.g. market surveillance) are dashboard-only end to end: create, update and revoke of such a grant are refused (400 role_dashboard_only).
IMPORTANT: create returns the secret pa_ token ONCE. Hand it to the recipient and do not repeat it, store it or put it in a log. It cannot be shown again; if lost, revoke the grant and create a new one. A confirmed grant gives a third party access to restricted data: confirm the recipient, role, scope and purpose with the user first.
Actions (pass via action; {…} is the args object). Reads never return a token.
list — { limit? (≤100), cursor?, role?, status? (active|expired|revoked), passportId?, productId? }.
get — { id }.
create — { role, label, purpose?, scope? ({ kind: company } with no ids, or { kind: products|passports, ids[] } with at least one id), evidence? ({ type: register_entry|invoice|authority_letter|contract|other, reference, note? }), expiresInDays? (1-1825; null = no expiry) }. WRITE.
update — { id, label?, purpose?, scope?, evidence?, expiresInDays? }; at least one. WRITE.
revoke — { id }. WRITE, ends the grant at once; repeating it is safe.
activity — { id, limit? (≤100), cursor? }. The grant's access log.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "tracepass_access_grants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| action | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| page | No | ||
| error | No | ||
| items | No | ||
| limit | No | ||
| total | No | ||
| result | No | ||
| message | No | ||
| totalPages | No |