@motorical/scope-catalog 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools.js +18 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motorical/scope-catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Canonical MCP/OAuth scope metadata for Motorical — descriptions, Public API scope mapping, implied-read rules, and declarative tool/resource membership. One source of truth consumed by motorical-backend and @motorical/mcp.",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"engines": {
|
package/src/tools.js
CHANGED
|
@@ -34,13 +34,14 @@ const ANALYTICS_TOOLS = [
|
|
|
34
34
|
'motorical_get_error_codes',
|
|
35
35
|
'motorical_get_rate_limits',
|
|
36
36
|
'motorical_get_account_rate_limits',
|
|
37
|
-
'motorical_get_onboarding_state',
|
|
38
37
|
'motorical_whoami',
|
|
39
38
|
'motorical_get_logs',
|
|
40
39
|
'motorical_get_message_by_smtp_id',
|
|
41
40
|
];
|
|
42
41
|
|
|
43
42
|
const DOMAIN_TOOLS = [
|
|
43
|
+
// Domain verification, DNS readiness and Motor Block state: a domains read (GET /account/state needs config.read, which read:domains carries).
|
|
44
|
+
'motorical_get_onboarding_state',
|
|
44
45
|
'motorical_domain_list',
|
|
45
46
|
'motorical_domain_get',
|
|
46
47
|
'motorical_domain_dns_records',
|
|
@@ -96,14 +97,22 @@ const ALL_TOOLS = [
|
|
|
96
97
|
]),
|
|
97
98
|
];
|
|
98
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Tools any OAuth grant may call, whatever scopes it holds (they carry an empty TOOL_SCOPES entry): a connection must be able to ask
|
|
102
|
+
* what it holds. Listed on every authenticated hosted server, appended after each server's own tools so the order of main and of
|
|
103
|
+
* the existing lists is unchanged. motorical_whoami was listed under read:analytics while the route behind it needed config.read,
|
|
104
|
+
* which read:analytics does not carry, so a read:analytics-only grant saw the tool and was refused (found 2026-10-22).
|
|
105
|
+
*/
|
|
106
|
+
const ANY_GRANT_TOOLS = ['motorical_whoami'];
|
|
107
|
+
|
|
99
108
|
const SERVER_TOOLS = {
|
|
100
109
|
main: ALL_TOOLS,
|
|
101
|
-
transactional: TRANSACTIONAL_TOOLS,
|
|
110
|
+
transactional: [...TRANSACTIONAL_TOOLS, ...ANY_GRANT_TOOLS],
|
|
102
111
|
analytics: ANALYTICS_TOOLS,
|
|
103
|
-
domains: DOMAIN_TOOLS,
|
|
104
|
-
sandbox: SANDBOX_TOOLS,
|
|
105
|
-
webhooks: WEBHOOK_TOOLS,
|
|
106
|
-
motorBlocks: MOTOR_BLOCK_TOOLS,
|
|
112
|
+
domains: [...DOMAIN_TOOLS, ...ANY_GRANT_TOOLS],
|
|
113
|
+
sandbox: [...SANDBOX_TOOLS, ...ANY_GRANT_TOOLS],
|
|
114
|
+
webhooks: [...WEBHOOK_TOOLS, ...ANY_GRANT_TOOLS],
|
|
115
|
+
motorBlocks: [...MOTOR_BLOCK_TOOLS, ...ANY_GRANT_TOOLS],
|
|
107
116
|
signup: ['motorical_signup_handoff'],
|
|
108
117
|
};
|
|
109
118
|
|
|
@@ -126,8 +135,8 @@ const TOOL_SCOPES = {
|
|
|
126
135
|
motorical_get_error_codes: ['read:analytics'],
|
|
127
136
|
motorical_get_rate_limits: ['read:analytics'],
|
|
128
137
|
motorical_get_account_rate_limits: ['read:analytics'],
|
|
129
|
-
motorical_get_onboarding_state: ['read:
|
|
130
|
-
motorical_whoami: [
|
|
138
|
+
motorical_get_onboarding_state: ['read:domains'],
|
|
139
|
+
motorical_whoami: [], // any OAuth grant; see ANY_GRANT_TOOLS
|
|
131
140
|
motorical_get_logs: ['read:analytics'],
|
|
132
141
|
motorical_get_message_by_smtp_id: ['read:analytics'],
|
|
133
142
|
motorical_get_config: ['read:domains'],
|
|
@@ -189,5 +198,5 @@ const RESOURCE_SCOPES = Object.fromEntries(
|
|
|
189
198
|
);
|
|
190
199
|
|
|
191
200
|
module.exports = {
|
|
192
|
-
MCP_HOST, SERVER_TOOLS, TOOL_SCOPES, scopesForTools, RESOURCE_SCOPES,
|
|
201
|
+
MCP_HOST, SERVER_TOOLS, TOOL_SCOPES, scopesForTools, RESOURCE_SCOPES, ANY_GRANT_TOOLS,
|
|
193
202
|
};
|