@findtime/mcp-server 3.25.10 → 3.25.11
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 +4 -0
- package/package.json +1 -1
- package/server.js +41 -0
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ Published surfaces:
|
|
|
13
13
|
|
|
14
14
|
## Tool surface
|
|
15
15
|
|
|
16
|
+
- `answer_time_question`
|
|
16
17
|
- `time_snapshot`
|
|
17
18
|
- `get_current_time`
|
|
18
19
|
- `get_dst_schedule`
|
|
@@ -22,6 +23,8 @@ Published surfaces:
|
|
|
22
23
|
- `search_timezones`
|
|
23
24
|
- `get_location_by_id`
|
|
24
25
|
|
|
26
|
+
Prefer `answer_time_question` for messy natural-language prompts such as "3pm PST to London", "what is the IANA timezone for San Francisco?", "working hours overlap for SF, Berlin, and Tokyo", or "what does CST mean?". The tool classifies the prompt through findtime.io's domain logic, dispatches to deterministic Time API behavior, and returns structured ambiguity or clarification when the world is genuinely ambiguous.
|
|
27
|
+
|
|
25
28
|
## Install in MCP clients
|
|
26
29
|
|
|
27
30
|
Use the published package through `npx`:
|
|
@@ -143,6 +146,7 @@ npm run test:mcp-server:smoke
|
|
|
143
146
|
The smoke suite checks:
|
|
144
147
|
|
|
145
148
|
- `search_timezones`
|
|
149
|
+
- `answer_time_question`
|
|
146
150
|
- `get_current_time`
|
|
147
151
|
- `get_dst_schedule`
|
|
148
152
|
- `convert_time`
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -51,6 +51,47 @@ const DEFAULT_API_KEY = firstNonEmpty(
|
|
|
51
51
|
const TIMEZONE_HELPERS_PATH = path.join(REPO_ROOT, 'slack-bot', 'timezone-helpers.js');
|
|
52
52
|
|
|
53
53
|
const TOOL_DEFINITIONS = [
|
|
54
|
+
{
|
|
55
|
+
name: 'answer_time_question',
|
|
56
|
+
description: 'Answer a natural-language time, timezone, conversion, DST, overlap, scheduling, abbreviation, or IANA timezone question. Prefer this for messy user prompts; findtime.io will classify intent and call the right deterministic time API behavior.',
|
|
57
|
+
inputSchema: {
|
|
58
|
+
type: 'object',
|
|
59
|
+
required: ['query'],
|
|
60
|
+
properties: {
|
|
61
|
+
query: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'The raw user time-related question or prompt.'
|
|
64
|
+
},
|
|
65
|
+
userTimezone: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'Optional IANA timezone for the user, used for relative questions like "my time" or "tomorrow".'
|
|
68
|
+
},
|
|
69
|
+
locale: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
description: 'Optional user locale hint, such as en-US.'
|
|
72
|
+
},
|
|
73
|
+
now: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
description: 'Optional ISO timestamp for deterministic relative-date handling.'
|
|
76
|
+
},
|
|
77
|
+
date: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
description: 'Optional YYYY-MM-DD date context.'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
additionalProperties: false
|
|
83
|
+
},
|
|
84
|
+
buildRequest(args) {
|
|
85
|
+
ensureRequired(args, ['query'], 'answer_time_question requires query.');
|
|
86
|
+
const params = new URLSearchParams();
|
|
87
|
+
setParam(params, 'query', args.query);
|
|
88
|
+
setParam(params, 'userTimezone', args.userTimezone);
|
|
89
|
+
setParam(params, 'locale', args.locale);
|
|
90
|
+
setParam(params, 'now', args.now);
|
|
91
|
+
setParam(params, 'date', args.date);
|
|
92
|
+
return { path: '/time/answer', params };
|
|
93
|
+
}
|
|
94
|
+
},
|
|
54
95
|
{
|
|
55
96
|
name: 'get_api_diagnostics',
|
|
56
97
|
description: 'Return MCP and findtime Time API diagnostics, including the running MCP version, latest published MCP version, API base URL, auth configuration, and a live health check.',
|