@findtime/mcp-server 3.25.13 → 3.25.14

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
@@ -49,6 +49,7 @@ Optional environment variables:
49
49
  - `TIME_API_BASE_URL`
50
50
  - `TIME_API_TIMEOUT_MS`
51
51
  - `FINDTIME_MCP_CLIENT_TYPE`
52
+ - `FINDTIME_MCP_TOOL_MODE=answer-only` to expose only `answer_time_question` and `get_api_diagnostics` for enterprise bots that should route every natural-language request through the answer API.
52
53
  - `FINDTIME_MCP_CLIENT_ID` or `FINDTIME_MCP_INSTALL_ID` to provide a stable client identifier. If omitted, the server creates one locally under the user's state directory.
53
54
  - `FINDTIME_MCP_INSTRUMENTATION_ENABLED=false` to opt out of anonymous usage telemetry.
54
55
  - `FINDTIME_MCP_USAGE_TELEMETRY_URL` to override the default telemetry endpoint.
package/SKILL.md CHANGED
@@ -72,9 +72,22 @@ Most MCP clients need the same core config:
72
72
 
73
73
  For a company bot or server-side agent, set `FINDTIME_MCP_CLIENT_TYPE` to a stable identifier such as `company-bot`, and provide a stable install ID with `FINDTIME_MCP_CLIENT_ID` or `FINDTIME_MCP_INSTALL_ID` when possible.
74
74
 
75
+ For enterprise bots that should avoid model-level tool selection across the lower-level APIs, set:
76
+
77
+ ```text
78
+ FINDTIME_MCP_TOOL_MODE=answer-only
79
+ ```
80
+
81
+ In answer-only mode, the MCP server exposes only:
82
+
83
+ - `answer_time_question`
84
+ - `get_api_diagnostics`
85
+
86
+ Use this mode when the bot should route all natural-language time requests through the answer API first.
87
+
75
88
  ## Tool Selection
76
89
 
77
- Use `answer_time_question` first for natural-language or ambiguous prompts.
90
+ Use `answer_time_question` first for natural-language or ambiguous prompts. In enterprise bot deployments, prefer `FINDTIME_MCP_TOOL_MODE=answer-only` so the agent sees `answer_time_question` as the default execution path instead of choosing lower-level tools directly.
78
91
 
79
92
  Examples:
80
93
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findtime/mcp-server",
3
- "version": "3.25.13",
3
+ "version": "3.25.14",
4
4
  "mcpName": "io.github.hkchao/findtime-mcp-server",
5
5
  "description": "Production-parity MCP server for the findtime.io Time API",
6
6
  "bin": {
package/server.js CHANGED
@@ -49,6 +49,7 @@ const DEFAULT_API_KEY = firstNonEmpty(
49
49
  process.env.FINDTIME_TIME_API_KEY
50
50
  );
51
51
  const TIMEZONE_HELPERS_PATH = path.join(REPO_ROOT, 'slack-bot', 'timezone-helpers.js');
52
+ const ANSWER_ONLY_TOOL_NAMES = new Set(['answer_time_question', 'get_api_diagnostics']);
52
53
 
53
54
  const TOOL_DEFINITIONS = [
54
55
  {
@@ -385,6 +386,25 @@ const TOOL_DEFINITIONS_BY_NAME = new Map(TOOL_DEFINITIONS.map((tool) => [tool.na
385
386
  let cachedResolveLocation;
386
387
  let cachedMcpClientId;
387
388
 
389
+ function getMcpToolMode() {
390
+ const mode = String(firstNonEmpty(
391
+ process.env.FINDTIME_MCP_TOOL_MODE,
392
+ process.env.FINDTIME_MCP_TOOLS
393
+ ) || 'full').trim().toLowerCase();
394
+
395
+ return ['answer-only', 'answer_only', 'answer'].includes(mode)
396
+ ? 'answer-only'
397
+ : 'full';
398
+ }
399
+
400
+ function getVisibleToolDefinitions() {
401
+ if (getMcpToolMode() !== 'answer-only') {
402
+ return TOOL_DEFINITIONS;
403
+ }
404
+
405
+ return TOOL_DEFINITIONS.filter((tool) => ANSWER_ONLY_TOOL_NAMES.has(tool.name));
406
+ }
407
+
388
408
  function safeReadJson(filePath) {
389
409
  try {
390
410
  return JSON.parse(fs.readFileSync(filePath, 'utf8'));
@@ -1073,7 +1093,7 @@ function createFindtimeMcpServer(options = {}) {
1073
1093
 
1074
1094
  async function callTool(name, args = {}) {
1075
1095
  const tool = TOOL_DEFINITIONS_BY_NAME.get(name);
1076
- if (!tool) {
1096
+ if (!tool || (getMcpToolMode() === 'answer-only' && !ANSWER_ONLY_TOOL_NAMES.has(name))) {
1077
1097
  throw invalidParamsError(`Unknown tool: ${name}`);
1078
1098
  }
1079
1099
 
@@ -1231,7 +1251,7 @@ function createFindtimeMcpServer(options = {}) {
1231
1251
 
1232
1252
  if (method === 'tools/list') {
1233
1253
  return createSuccessResponse(message.id, {
1234
- tools: TOOL_DEFINITIONS.map(({ name, description, inputSchema }) => ({
1254
+ tools: getVisibleToolDefinitions().map(({ name, description, inputSchema }) => ({
1235
1255
  name,
1236
1256
  description,
1237
1257
  inputSchema