Grant or ask for access
access_grantGive access, ask for it, or decide on it. A grant changes who can read the content and cannot be unread, so every action here is treated as consequential. A request goes to the lowest common ancestor of you and the data's owner and climbs until it reaches someone who can grant it. Actions — share: grant members of this organization, by email or by member id from browse action=people, viewer or editor (or manager) on a folder or document; two calls, the first previews who would be granted and returns a confirm_token, and an address or id that is no member is refused. The second is all or nothing: if it fails partway, nobody was granted. request: ask for a role on something (location or node, role, reason); wait=true with a deadline registers a wait for the decision. approve: approve a request routed to you (request_id, note). decline: decline a request routed to you (request_id, note). declassify: release what your session has read so your next write is not labeled with it (sources), or one label on a document (location or node, source). hold: place a legal hold so nothing under it can be erased or purged (location or node, or identity; reason). share_out: offer a folder or document to a person in another organization by email (location or node, to, role); an agent below a person's own client proposes instead, and that person decides in the console. An address with no account is invited. The answer says whether they were emailed and carries recipient_link. accept_share: accept an offer made to you, a person (share_id), into the organization this connection is in; the answer names it. organization, if given, must be that one: a person in several picks another in the console. It lands under its own name at the top level, or inside location: a folder only you can see (refused, with the reasons, anywhere else). Only you and your agents read it. decline_share: decline an offer made to you (share_id). decide_share: a person decides a proposal (share_id, approve); refused to every AI client. set_settings: set whether editors may share a folder or document (location or node, editors_can_share: true, false, or null to inherit); owner or manager only. grant_capability: let the agents working in a folder and below it get a short-lived credential for an outside service (location or node, target: github:/, permissions: GitHub App permission name:read or :write, repeatable, max_ttl_s at most 3600); manager only, for a repository whose owner the organization's GitHub App is installed on.
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": "access_grant"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | share_out: the recipient's email | |
| node | No | request, declassify, hold, share_out, set_settings: the document or folder, by id instead of location. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. · grant_capability: the folder, by id instead of location. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| note | No | approve, decline: a note to the requester | |
| role | No | share: viewer opens it; editor also edits; manager can also approve access requests for it, share it and grant within it. Sharing needs manager on this folder or one above it, or editor there to share as viewer or editor, unless its owner turned editor sharing off (access_grant action=set_settings). reader, writer and approver are deprecated aliases for viewer, editor and manager · request, share_out: default viewer. editor can also edit; manager (request only) can also share it, grant within it and decide requests for it. An approved request gives the role to everyone you work under who lacks it, too. Asking for a role you already hold, or one below it (manager implies editor, editor implies viewer), is refused. reader, writer and approver are deprecated aliases for viewer, editor and manager | |
| seat | No | the seat token identity_write action=take_seat gave you; pass it on every call while you drive that agent, and each call that carries it keeps the seat yours for a whole lease from that call | |
| wait | No | request: also register a wait for the decision | |
| action | Yes | what to do; each action takes the arguments its line names | |
| emails | No | share: email addresses to share with; give emails, members or both (at most 20 recipients per call) | |
| reason | No | request, hold, share_out, grant_capability: why you are doing this, in one line (at most 200 characters); recorded with the event and exported with the log | |
| source | No | declassify: the label's source, a path or node id. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| target | No | grant_capability: the outside service: github:<owner>/<repo> | |
| approve | No | decide_share: true to offer it, false to decline | |
| members | No | share: member ids from browse action=people, for a person whose address you do not have; the preview names who each one is | |
| sources | No | declassify: which read sources to release (paths or node ids); default all. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| deadline | No | request: with wait: when to stop waiting (ISO) | |
| identity | No | hold: an identity id, to hold its drafts | |
| location | No | share: full path from the workspace root, e.g. "handbook/vendor/acme.md" (as printed by browse action=documents or search). A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. · request, declassify, hold, share_out, accept_share, set_settings: the document or folder, by path; accept_share: the folder to put it in, only you can see (default the top level) · grant_capability: the folder, by path. A console link (`/d/<Name-Slug>-<32 hex>`, whole or just its id) is accepted too. | |
| share_id | No | accept_share, decline_share, decide_share: the share's id, from access_read action=offers, shared or proposals | |
| acting_as | No | an agent identity below you, or one working in a folder you can write (pass its seat too), by its id (from identity_write action=spawn) or its @handle (brief_me lists your agents with both), to make this one call as, with that agent's narrower access; for a helper whose session signs in as its person | |
| max_ttl_s | No | grant_capability: the longest a credential issued under it lives, in seconds (default and most 3600) | |
| request_id | No | approve, decline: the request's id, from access_read action=requests or my_requests | |
| scope_type | No | share: folder (the default) shares everything beneath the path; document shares that one file. A pasted link's kind is used when omitted. | |
| permissions | No | grant_capability: GitHub App permission name and level, repeatable, e.g. issues:write, contents:read | |
| continuation | No | request: with wait: a note to your future self for when it resolves | |
| organization | No | accept_share: the organization to put an accepted share in, by id or name: only the one this connection is in; omit for that one | |
| confirm_token | No | share: from the first call. Calling without it PREVIEWS: nothing is shared. | |
| idempotency_key | No | Any unique string you choose for this write, e.g. a UUID. If you retry the call with the same key and the same arguments, the first answer is returned and nothing is done twice. Reusing a key for a different request is refused. Keys are kept 24 hours. | |
| editors_can_share | No | set_settings: true lets editors share here, false stops them, null clears this node's own setting so it inherits |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hold | No | ||
| role | No | ||
| text | No | the answer as prose, for an action that answers in prose | |
| wait | No | ||
| across | No | ||
| action | Yes | the action that answered | |
| canSee | No | ||
| labels | No | ||
| emailed | No | share_out when offered or invited: whether the recipient is emailed; when false, send them recipient_link | |
| refused | No | ||
| request | No | ||
| revoked | No | ||
| requests | No | ||
| scope_id | No | ||
| settings | No | ||
| invitation | No | ||
| scope_type | No | ||
| subject_id | No | ||
| capabilities | No | ||
| declassified | No | ||
| organization | No | accept_share: the organization it went into | |
| subject_type | No | ||
| recipient_link | No | share_out: when offered, the recipient's inbox for this offer; when invited, the invitation's preview, names only. Absolute; absent when the console's public URL is not configured. It grants no access | |
| not_emailed_reason | No | share_out when invited: why the recipient is not emailed, when emailed is false |