togello-mcp-server 1.0.47 → 1.0.48
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/README.md
CHANGED
|
@@ -65,6 +65,8 @@ Remote OAuth clients that connect to `/mcp` should discover protected resource m
|
|
|
65
65
|
|
|
66
66
|
The configured OAuth issuer must be an origin URL without a path component.
|
|
67
67
|
|
|
68
|
+
Clients that use `list-active-scheduling-polls` must explicitly include `gathers:read` in the OAuth authorization request alongside the scopes they already need. For an existing connection without `gathers:read`, start a new authorization from the client's reconnect or reauthorize flow and approve the scope on the Togello consent screen. Existing grants keep their original scopes on refresh. Continue requesting `offline_access` when the client needs a refresh token. For stdio or `env` mode, provide the resulting OAuth access token as `TOGELLO_API_TOKEN` to use this tool.
|
|
69
|
+
|
|
68
70
|
For OpenAI Apps domain verification, set `TOGELLO_MCP_OPENAI_APPS_CHALLENGE_TOKEN` to the verification token. Remote mode then serves it from `/.well-known/openai-apps-challenge` as `text/plain`. If both `TOGELLO_MCP_OPENAI_APPS_CHALLENGE_TOKEN` and `OPENAI_APPS_CHALLENGE_TOKEN` are set, the Togello-scoped variable takes precedence.
|
|
69
71
|
|
|
70
72
|
### Muse host verification (provisional)
|
|
@@ -107,7 +109,7 @@ All tools set MCP `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotat
|
|
|
107
109
|
- `get-today-calendar`: Retrieves linked Google Calendar events and scheduled tasks.
|
|
108
110
|
- `get-activity-item-list`: Retrieves enabled activity items.
|
|
109
111
|
- `get-activity-log-list`: Retrieves activity logs.
|
|
110
|
-
- `list-active-scheduling-polls`: Lists active scheduling polls (ADJUSTMENT), confirmed events (CONFIRM), and recruitments (RECRUITMENT) created or previously viewed by the authenticated user, using `GET /v2/gathers`. Takes no arguments. Unconfirmed polls are active through their adjustment end time; confirmed events and recruitments are active through their start time, inclusive. Already-started events are excluded even if they have not ended. Missing or invalid eligibility dates are excluded. Results retain API ordering and contain only UUID, title, mode, adjustment and confirmed timestamps, participant counts, and relationship type. Returns `{ "gathers": [] }` when none qualify; API failures are errors.
|
|
112
|
+
- `list-active-scheduling-polls`: Lists active scheduling polls (ADJUSTMENT), confirmed events (CONFIRM), and recruitments (RECRUITMENT) created or previously viewed by the authenticated user, using `GET /v2/integration/gathers` with a Togello OAuth access token granted `gathers:read`. Takes no arguments. Unconfirmed polls are active through their adjustment end time; confirmed events and recruitments are active through their start time, inclusive. Already-started events are excluded even if they have not ended. Missing or invalid eligibility dates are excluded. Results retain API ordering and contain only UUID, title, mode, adjustment and confirmed timestamps, participant counts, and relationship type. Returns `{ "gathers": [] }` when none qualify; API failures are errors.
|
|
111
113
|
- `get-japan-current-time`: Returns the current time in Japan.
|
|
112
114
|
|
|
113
115
|
The former tool ID `get-active-gathers` has been replaced by `list-active-scheduling-polls`; clients that store the old ID must update it. No compatibility alias is provided.
|
package/build/client.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { getUpstreamToken } from './upstreamTokenContext.js';
|
|
2
2
|
const API_BASE_URL = process.env.TOGELLO_API_BASE_URL ?? 'https://togello.api.toru-takagi.dev';
|
|
3
|
+
export class HttpStatusError extends Error {
|
|
4
|
+
status;
|
|
5
|
+
constructor(status) {
|
|
6
|
+
super(`response status: ${status}`);
|
|
7
|
+
this.status = status;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
3
10
|
function getApiTokenOrThrow() {
|
|
4
11
|
const token = getUpstreamToken() ?? process.env.TOGELLO_API_TOKEN;
|
|
5
12
|
if (!token) {
|
|
@@ -32,7 +39,7 @@ export const httpClient = {
|
|
|
32
39
|
},
|
|
33
40
|
});
|
|
34
41
|
if (!response.ok) {
|
|
35
|
-
throw new
|
|
42
|
+
throw new HttpStatusError(response.status);
|
|
36
43
|
}
|
|
37
44
|
return (await response.json());
|
|
38
45
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { httpClient } from '../../client.js';
|
|
1
|
+
import { HttpStatusError, httpClient } from '../../client.js';
|
|
2
2
|
import { errorToolResponse, jsonToolResponse } from './toolResponse.js';
|
|
3
3
|
export const getActiveGathersHandler = async () => {
|
|
4
4
|
const now = Date.now();
|
|
5
5
|
try {
|
|
6
6
|
const gathers = await httpClient.fetchURL({
|
|
7
|
-
path: '/v2/gathers',
|
|
7
|
+
path: '/v2/integration/gathers',
|
|
8
8
|
});
|
|
9
9
|
return jsonToolResponse({
|
|
10
10
|
gathers: gathers
|
|
@@ -28,7 +28,15 @@ export const getActiveGathersHandler = async () => {
|
|
|
28
28
|
})),
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
catch {
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error instanceof HttpStatusError) {
|
|
33
|
+
if (error.status === 401) {
|
|
34
|
+
return errorToolResponse('A valid Togello OAuth access token with gathers:read is required. Reconnect or reauthorize with Togello OAuth.');
|
|
35
|
+
}
|
|
36
|
+
if (error.status === 403) {
|
|
37
|
+
return errorToolResponse('The gathers:read scope is required. Reauthorize the Togello OAuth connection and grant gathers:read.');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
32
40
|
return errorToolResponse('Error retrieving active gathers');
|
|
33
41
|
}
|
|
34
42
|
};
|
package/build/mcpServer.js
CHANGED
|
@@ -242,7 +242,7 @@ export function createMcpServer(options = {}) {
|
|
|
242
242
|
annotations: readOnlyToolAnnotations,
|
|
243
243
|
}, withUpstreamToken(getJapanCurrentTimeHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
|
|
244
244
|
server.registerTool('list-active-scheduling-polls', {
|
|
245
|
-
description: 'Lists active scheduling polls (ADJUSTMENT), confirmed events (CONFIRM), and recruitments (RECRUITMENT) created or previously viewed by the authenticated user. Unconfirmed polls remain active until the adjustment end time; confirmed events and recruitments remain active until their start time, inclusive. Events that have already started are excluded.',
|
|
245
|
+
description: 'Lists active scheduling polls (ADJUSTMENT), confirmed events (CONFIRM), and recruitments (RECRUITMENT) created or previously viewed by the authenticated user. Unconfirmed polls remain active until the adjustment end time; confirmed events and recruitments remain active until their start time, inclusive. Events that have already started are excluded. Requires the gathers:read OAuth scope.',
|
|
246
246
|
inputSchema: z.strictObject({}),
|
|
247
247
|
annotations: readOnlyToolAnnotations,
|
|
248
248
|
}, withUpstreamToken(getActiveGathersHandler, options.resolveUpstreamToken, options.requireUpstreamToken));
|
package/build/remoteServer.js
CHANGED
package/package.json
CHANGED