@motorical/scope-catalog 0.5.0 → 0.6.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 +15 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motorical/scope-catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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
|
@@ -96,14 +96,22 @@ const ALL_TOOLS = [
|
|
|
96
96
|
]),
|
|
97
97
|
];
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Tools any OAuth grant may call, whatever scopes it holds (they carry an empty TOOL_SCOPES entry): a connection must be able to ask
|
|
101
|
+
* what it holds. Listed on every authenticated hosted server, appended after each server's own tools so the order of main and of
|
|
102
|
+
* the existing lists is unchanged. motorical_whoami was listed under read:analytics while the route behind it needed config.read,
|
|
103
|
+
* which read:analytics does not carry, so a read:analytics-only grant saw the tool and was refused (found 2026-10-22).
|
|
104
|
+
*/
|
|
105
|
+
const ANY_GRANT_TOOLS = ['motorical_whoami'];
|
|
106
|
+
|
|
99
107
|
const SERVER_TOOLS = {
|
|
100
108
|
main: ALL_TOOLS,
|
|
101
|
-
transactional: TRANSACTIONAL_TOOLS,
|
|
109
|
+
transactional: [...TRANSACTIONAL_TOOLS, ...ANY_GRANT_TOOLS],
|
|
102
110
|
analytics: ANALYTICS_TOOLS,
|
|
103
|
-
domains: DOMAIN_TOOLS,
|
|
104
|
-
sandbox: SANDBOX_TOOLS,
|
|
105
|
-
webhooks: WEBHOOK_TOOLS,
|
|
106
|
-
motorBlocks: MOTOR_BLOCK_TOOLS,
|
|
111
|
+
domains: [...DOMAIN_TOOLS, ...ANY_GRANT_TOOLS],
|
|
112
|
+
sandbox: [...SANDBOX_TOOLS, ...ANY_GRANT_TOOLS],
|
|
113
|
+
webhooks: [...WEBHOOK_TOOLS, ...ANY_GRANT_TOOLS],
|
|
114
|
+
motorBlocks: [...MOTOR_BLOCK_TOOLS, ...ANY_GRANT_TOOLS],
|
|
107
115
|
signup: ['motorical_signup_handoff'],
|
|
108
116
|
};
|
|
109
117
|
|
|
@@ -127,7 +135,7 @@ const TOOL_SCOPES = {
|
|
|
127
135
|
motorical_get_rate_limits: ['read:analytics'],
|
|
128
136
|
motorical_get_account_rate_limits: ['read:analytics'],
|
|
129
137
|
motorical_get_onboarding_state: ['read:analytics'],
|
|
130
|
-
motorical_whoami: [
|
|
138
|
+
motorical_whoami: [], // any OAuth grant; see ANY_GRANT_TOOLS
|
|
131
139
|
motorical_get_logs: ['read:analytics'],
|
|
132
140
|
motorical_get_message_by_smtp_id: ['read:analytics'],
|
|
133
141
|
motorical_get_config: ['read:domains'],
|
|
@@ -189,5 +197,5 @@ const RESOURCE_SCOPES = Object.fromEntries(
|
|
|
189
197
|
);
|
|
190
198
|
|
|
191
199
|
module.exports = {
|
|
192
|
-
MCP_HOST, SERVER_TOOLS, TOOL_SCOPES, scopesForTools, RESOURCE_SCOPES,
|
|
200
|
+
MCP_HOST, SERVER_TOOLS, TOOL_SCOPES, scopesForTools, RESOURCE_SCOPES, ANY_GRANT_TOOLS,
|
|
193
201
|
};
|