@motorical/scope-catalog 0.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motorical/scope-catalog",
3
- "version": "0.4.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/scopes.js CHANGED
@@ -78,8 +78,8 @@ const SCOPES = {
78
78
  resource: 'domains',
79
79
  level: 'read',
80
80
  publicScopes: ['config.read'],
81
- agentDescription: 'List and read sending domains, without adding or verifying any.',
82
- customerAction: 'View your sending domains',
81
+ agentDescription: 'List and read sending domains, their DNS records and email-authentication health, and read a Motor Block\'s configuration, without adding or verifying any domain.',
82
+ customerAction: 'View your sending domains and Motor Block configuration',
83
83
  },
84
84
  };
85
85
 
package/src/tools.js CHANGED
@@ -42,6 +42,9 @@ const ANALYTICS_TOOLS = [
42
42
 
43
43
  const DOMAIN_TOOLS = [
44
44
  'motorical_domain_list',
45
+ 'motorical_domain_get',
46
+ 'motorical_domain_dns_records',
47
+ 'motorical_domain_health',
45
48
  'motorical_domain_add',
46
49
  'motorical_domain_verify',
47
50
  'motorical_domain_check_dns',
@@ -93,14 +96,22 @@ const ALL_TOOLS = [
93
96
  ]),
94
97
  ];
95
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
+
96
107
  const SERVER_TOOLS = {
97
108
  main: ALL_TOOLS,
98
- transactional: TRANSACTIONAL_TOOLS,
109
+ transactional: [...TRANSACTIONAL_TOOLS, ...ANY_GRANT_TOOLS],
99
110
  analytics: ANALYTICS_TOOLS,
100
- domains: DOMAIN_TOOLS,
101
- sandbox: SANDBOX_TOOLS,
102
- webhooks: WEBHOOK_TOOLS,
103
- 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],
104
115
  signup: ['motorical_signup_handoff'],
105
116
  };
106
117
 
@@ -124,12 +135,15 @@ const TOOL_SCOPES = {
124
135
  motorical_get_rate_limits: ['read:analytics'],
125
136
  motorical_get_account_rate_limits: ['read:analytics'],
126
137
  motorical_get_onboarding_state: ['read:analytics'],
127
- motorical_whoami: ['read:analytics'],
138
+ motorical_whoami: [], // any OAuth grant; see ANY_GRANT_TOOLS
128
139
  motorical_get_logs: ['read:analytics'],
129
140
  motorical_get_message_by_smtp_id: ['read:analytics'],
130
- motorical_get_config: ['manage:domains'],
131
- motorical_get_domain_health: ['manage:domains'],
141
+ motorical_get_config: ['read:domains'],
142
+ motorical_get_domain_health: ['read:domains'],
132
143
  motorical_domain_list: ['read:domains'],
144
+ motorical_domain_get: ['read:domains'],
145
+ motorical_domain_dns_records: ['read:domains'],
146
+ motorical_domain_health: ['read:domains'],
133
147
  motorical_domain_add: ['manage:domains'],
134
148
  motorical_domain_verify: ['manage:domains'],
135
149
  motorical_domain_check_dns: ['manage:domains'],
@@ -183,5 +197,5 @@ const RESOURCE_SCOPES = Object.fromEntries(
183
197
  );
184
198
 
185
199
  module.exports = {
186
- MCP_HOST, SERVER_TOOLS, TOOL_SCOPES, scopesForTools, RESOURCE_SCOPES,
200
+ MCP_HOST, SERVER_TOOLS, TOOL_SCOPES, scopesForTools, RESOURCE_SCOPES, ANY_GRANT_TOOLS,
187
201
  };