Views and scripts can call resources.list({action, limit?}). Chat uses the same
entry as resources_list. The host binds the caller. This entry cannot change
Access, manage sign-in, read tokens, or call a provider API.
The result is {resources, complete}. Each resource has id, connectorId,
name, and isDefault. It contains only resources the app can currently use
with Allow for the requested action. Names can contain personal data; show
them as text. App-scope permission rows are excluded because they are not direct
operation targets.
const page = await cap.call('resources.list', {
action: 'database.read',
limit: 100,
});
if (!page.complete) throw new Error('The resource list is incomplete.');
const selected = page.resources.find((resource) => resource.id === chosenResourceId);
if (!selected) throw new Error('Select an allowed resource.');
const result = await cap.call('database.list', {
connection: selected.id,
limit: 20,
});
The default result limit is 20; the maximum is 100. The host checks at most 512
candidate resources. complete is false if either limit hides further results
or candidates. There is no paging cursor. An empty result means no resources
were returned with Allow; it does not prove that no accounts are connected.
Unknown actions and unavailable providers also return no resource metadata.
Unavailable apps and expired callers are refused by the dispatcher.
Declare the capability action in the app manifest. Discovery does not require a separate action, connector, or grant. Ask and Off resources are excluded. An ordinary capability call can still request approval for a known Ask resource. For discovery and scheduled calls, the owner must set the target action to Allow in Access. Discovery never opens an approval prompt.
Selection rules
For entries that use the default Access resolver, connection first matches an
exact resource ID, then a case-insensitive resource name. An explicit unknown or
malformed selector is refused, including when only one resource exists. If the
selector is omitted, the resolver uses the connector default, then the first
available resource. Use stable IDs for saved app settings and scheduled jobs.
Some entries have their own resource binding. Record operations require an
explicit collection ID. File operations derive the mount from path, and
Browser operations use Workspace browser. Resource discovery does not change
those argument rules; use the current SDK contract for each entry.
The Access resource detail page permits default selection on sign-in connectors with several user resources, including SDK-only connectors. Its owner-only entry refuses stale policy versions before saving. Defaults are per connector; they do not grant Access. A default might be absent from the discovery result because that app lacks Allow. Discovery is a snapshot; every subsequent call checks current Access again. The metadata entry is available to bound apps and Chat on the desktop; direct Remote Link phone calls are not exposed.