@anyshift/mcp-proxy 0.4.2-dev0 → 0.4.2

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.
@@ -5,18 +5,10 @@ import { generateQueryAssistSchema, generateJsonlQueryAssistSchema } from './sch
5
5
  import { parseDynatraceDqlResponse, isDynatraceDqlTool, } from './dynatrace.js';
6
6
  // Default minimum character count to trigger file writing
7
7
  const DEFAULT_MIN_CHARS = 1000;
8
- /**
9
- * Generate the message to include when data is written to file, guiding the LLM on how to use the result.
10
- * The message conditionally includes the timeseries tool based on configuration.
11
- */
12
- function getFileWrittenMessage(enableTimeseries) {
13
- const toolsList = enableTimeseries
14
- ? '"execute_jq_query" tool (for JSON/JSONL data extraction and transformation) or "detect_timeseries_anomalies" tool (for time series analysis)'
15
- : '"execute_jq_query" tool (for JSON/JSONL data extraction and transformation)';
16
- return `To read this file, use the ${toolsList}.
8
+ // Message to include when data is written to file, guiding the LLM on how to use the result
9
+ const FILE_WRITTEN_MESSAGE = `To read this file, use the "execute_jq_query" tool (for JSON/JSONL data extraction and transformation) or "detect_timeseries_anomalies" tool (for time series analysis, if available).
17
10
 
18
11
  IMPORTANT for supporting facts: This tool_id CANNOT be used as the proxy_tool_id in your output's supporting_facts evidence. You must read the file using one of the tools above and use THAT tool's tool_id as the proxy_tool_id to support facts in your output.`;
19
- }
20
12
  /**
21
13
  * Detect whether content is JSON, JSONL, or plain text
22
14
  */
@@ -263,7 +255,7 @@ async function handleDynatraceDqlResponse(config, tool_id, parsedDql) {
263
255
  wroteToFile: true,
264
256
  filePath: filepath,
265
257
  fileSchema,
266
- message: getFileWrittenMessage(config.enableTimeseries ?? false),
258
+ message: FILE_WRITTEN_MESSAGE,
267
259
  };
268
260
  }
269
261
  catch (error) {
@@ -401,7 +393,7 @@ export async function handleToolResponse(config, toolName, args, responseData) {
401
393
  wroteToFile: true,
402
394
  filePath: filepath,
403
395
  fileSchema,
404
- message: getFileWrittenMessage(config.enableTimeseries ?? false),
396
+ message: FILE_WRITTEN_MESSAGE,
405
397
  };
406
398
  }
407
399
  catch (error) {
package/dist/index.js CHANGED
@@ -324,8 +324,7 @@ async function main() {
324
324
  toolAbbreviations: {}, // No service-specific abbreviations (generic proxy)
325
325
  schemaMaxDepth: SCHEMA_MAX_DEPTH,
326
326
  schemaMaxPaths: SCHEMA_MAX_PATHS,
327
- schemaMaxKeys: SCHEMA_MAX_KEYS,
328
- enableTimeseries: ENABLE_TIMESERIES
327
+ schemaMaxKeys: SCHEMA_MAX_KEYS
329
328
  };
330
329
  const fileWriter = createFileWriter(fileWriterConfig);
331
330
  // JQ tool configuration
@@ -34,8 +34,6 @@ export interface FileWriterConfig {
34
34
  schemaMaxPaths?: number;
35
35
  /** Maximum keys to analyze per object (default: 50) */
36
36
  schemaMaxKeys?: number;
37
- /** Whether the timeseries anomaly detection tool is enabled (affects file-written message) */
38
- enableTimeseries?: boolean;
39
37
  }
40
38
  /**
41
39
  * Configuration for the JQ tool
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anyshift/mcp-proxy",
3
- "version": "0.4.2-dev0",
3
+ "version": "0.4.2",
4
4
  "description": "Generic MCP proxy that adds truncation, file writing, and JQ capabilities to any MCP server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",