converse-mcp-server 2.9.2 → 2.9.4

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/bin/converse.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "converse-mcp-server",
3
- "version": "2.9.2",
3
+ "version": "2.9.4",
4
4
  "description": "Converse MCP Server - Converse with other LLMs with chat and consensus tools",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -11,60 +11,6 @@
11
11
  "engines": {
12
12
  "node": ">=20.0.0"
13
13
  },
14
- "scripts": {
15
- "kill-server": "node scripts/kill-server.js",
16
- "start": "npm run kill-server && node src/index.js",
17
- "start:clean": "node src/index.js",
18
- "start:port": "cross-env PORT=3001 npm run start:clean",
19
- "dev": "npm run kill-server && cross-env NODE_ENV=development LOG_LEVEL=debug node --watch src/index.js",
20
- "dev:clean": "cross-env NODE_ENV=development LOG_LEVEL=debug node --watch src/index.js",
21
- "dev:port": "cross-env PORT=3001 npm run dev:clean",
22
- "dev:quiet": "npm run kill-server && cross-env NODE_ENV=development LOG_LEVEL=info node --watch src/index.js",
23
- "dev:verbose": "npm run kill-server && cross-env NODE_ENV=development LOG_LEVEL=trace node --watch src/index.js",
24
- "test": "npm run test:all",
25
- "test:all": "vitest run",
26
- "test:watch": "vitest",
27
- "test:unit": "vitest run --config vitest.unit.config.js",
28
- "test:integration": "vitest run --config vitest.integration.config.js",
29
- "test:integration:mcp": "vitest run tests/integration/mcp-protocol",
30
- "test:integration:tools": "vitest run tests/integration/tools",
31
- "test:integration:providers": "vitest run tests/integration/providers",
32
- "test:integration:performance": "vitest run tests/integration/performance",
33
- "test:integration:general": "vitest run tests/integration/general",
34
- "test:e2e": "npm run test:real-api",
35
- "test:providers": "vitest run --config vitest.providers.config.js",
36
- "test:tools": "vitest run tests/tools",
37
- "test:mcp-client": "vitest run --config vitest.mcp-client.config.js",
38
- "test:real-api": "vitest run --config vitest.real-api.config.js",
39
- "test:performance": "vitest run --config vitest.performance.config.js",
40
- "test:ci": "vitest run --config vitest.ci.config.js",
41
- "test:utils": "vitest run tests/utils",
42
- "test:resources": "vitest run tests/resources",
43
- "test:prompts": "vitest run tests/prompts",
44
- "test:coverage": "vitest run --coverage",
45
- "test:coverage:unit": "vitest run --config vitest.unit.config.js --coverage",
46
- "test:coverage:integration": "vitest run --config vitest.integration.config.js --coverage",
47
- "test:coverage:mcp-client": "vitest run --config vitest.mcp-client.config.js --coverage",
48
- "test:ui": "vitest --ui",
49
- "lint": "eslint src/ tests/",
50
- "lint:fix": "eslint src/ tests/ --fix",
51
- "lint:watch": "nodemon --exec \"npm run lint\" --watch src --watch tests",
52
- "format": "prettier --write src/ tests/ *.md *.json",
53
- "format:check": "prettier --check src/ tests/ *.md *.json",
54
- "typecheck": "node scripts/typecheck.js",
55
- "validate:simple": "npm run typecheck && npm run lint && npm run format:check && npm run test",
56
- "clean": "rimraf node_modules package-lock.json && npm install",
57
- "debug": "cross-env NODE_ENV=development LOG_LEVEL=trace node --inspect src/index.js",
58
- "debug:break": "cross-env NODE_ENV=development LOG_LEVEL=trace node --inspect-brk src/index.js",
59
- "check-deps": "npm outdated",
60
- "update-deps": "npm update",
61
- "security-audit": "npm audit",
62
- "dev-server": "node dev-server.js",
63
- "validate": "node scripts/validate.js",
64
- "validate:fix": "node scripts/validate.js --fix",
65
- "validate:fast": "node scripts/validate.js --skip-tests --skip-lint",
66
- "precommit": "npm run validate"
67
- },
68
14
  "keywords": [
69
15
  "mcp",
70
16
  "server",
@@ -118,5 +64,59 @@
118
64
  "prettier": "^3.6.2",
119
65
  "rimraf": "^6.1.0",
120
66
  "vitest": "^4.0.10"
67
+ },
68
+ "scripts": {
69
+ "kill-server": "node scripts/kill-server.js",
70
+ "start": "npm run kill-server && node src/index.js",
71
+ "start:clean": "node src/index.js",
72
+ "start:port": "cross-env PORT=3001 npm run start:clean",
73
+ "dev": "npm run kill-server && cross-env NODE_ENV=development LOG_LEVEL=debug node --watch src/index.js",
74
+ "dev:clean": "cross-env NODE_ENV=development LOG_LEVEL=debug node --watch src/index.js",
75
+ "dev:port": "cross-env PORT=3001 npm run dev:clean",
76
+ "dev:quiet": "npm run kill-server && cross-env NODE_ENV=development LOG_LEVEL=info node --watch src/index.js",
77
+ "dev:verbose": "npm run kill-server && cross-env NODE_ENV=development LOG_LEVEL=trace node --watch src/index.js",
78
+ "test": "npm run test:all",
79
+ "test:all": "vitest run",
80
+ "test:watch": "vitest",
81
+ "test:unit": "vitest run --config vitest.unit.config.js",
82
+ "test:integration": "vitest run --config vitest.integration.config.js",
83
+ "test:integration:mcp": "vitest run tests/integration/mcp-protocol",
84
+ "test:integration:tools": "vitest run tests/integration/tools",
85
+ "test:integration:providers": "vitest run tests/integration/providers",
86
+ "test:integration:performance": "vitest run tests/integration/performance",
87
+ "test:integration:general": "vitest run tests/integration/general",
88
+ "test:e2e": "npm run test:real-api",
89
+ "test:providers": "vitest run --config vitest.providers.config.js",
90
+ "test:tools": "vitest run tests/tools",
91
+ "test:mcp-client": "vitest run --config vitest.mcp-client.config.js",
92
+ "test:real-api": "vitest run --config vitest.real-api.config.js",
93
+ "test:performance": "vitest run --config vitest.performance.config.js",
94
+ "test:ci": "vitest run --config vitest.ci.config.js",
95
+ "test:utils": "vitest run tests/utils",
96
+ "test:resources": "vitest run tests/resources",
97
+ "test:prompts": "vitest run tests/prompts",
98
+ "test:coverage": "vitest run --coverage",
99
+ "test:coverage:unit": "vitest run --config vitest.unit.config.js --coverage",
100
+ "test:coverage:integration": "vitest run --config vitest.integration.config.js --coverage",
101
+ "test:coverage:mcp-client": "vitest run --config vitest.mcp-client.config.js --coverage",
102
+ "test:ui": "vitest --ui",
103
+ "lint": "eslint src/ tests/",
104
+ "lint:fix": "eslint src/ tests/ --fix",
105
+ "lint:watch": "nodemon --exec \"npm run lint\" --watch src --watch tests",
106
+ "format": "prettier --write src/ tests/ *.md *.json",
107
+ "format:check": "prettier --check src/ tests/ *.md *.json",
108
+ "typecheck": "node scripts/typecheck.js",
109
+ "validate:simple": "npm run typecheck && npm run lint && npm run format:check && npm run test",
110
+ "clean": "rimraf node_modules package-lock.json && npm install",
111
+ "debug": "cross-env NODE_ENV=development LOG_LEVEL=trace node --inspect src/index.js",
112
+ "debug:break": "cross-env NODE_ENV=development LOG_LEVEL=trace node --inspect-brk src/index.js",
113
+ "check-deps": "npm outdated",
114
+ "update-deps": "npm update",
115
+ "security-audit": "npm audit",
116
+ "dev-server": "node dev-server.js",
117
+ "validate": "node scripts/validate.js",
118
+ "validate:fix": "node scripts/validate.js --fix",
119
+ "validate:fast": "node scripts/validate.js --skip-tests --skip-lint",
120
+ "precommit": "npm run validate"
121
121
  }
122
- }
122
+ }
@@ -326,6 +326,10 @@ function generateConfigurationTips(tools) {
326
326
 
327
327
  // File Context
328
328
  output += '### File Context\n';
329
+ output +=
330
+ '- **IMPORTANT**: Always use the `files` parameter to share code/file content instead of copying into the prompt\n';
331
+ output +=
332
+ '- Using `files` provides better formatting, line numbers, and preserves full context\n';
329
333
  output +=
330
334
  '- Supports multiple file formats: code files, text, markdown, JSON, etc.\n';
331
335
  output +=
@@ -509,67 +513,19 @@ These providers use local CLI tools and don't require API keys:
509
513
 
510
514
  /**
511
515
  * Help prompt handler function
512
- * @param {object} args - Prompt arguments
516
+ * @param {object} args - Prompt arguments (unused)
513
517
  * @param {object} config - Configuration object (optional)
514
518
  */
515
519
  export async function helpPromptHandler(args = {}, config = null) {
516
- const { topic } = args;
517
-
518
520
  const fullHelp = generateHelpContent(config);
519
521
 
520
- // If no topic specified, return full help
521
- if (!topic) {
522
- return {
523
- messages: [
524
- {
525
- role: 'user',
526
- content: {
527
- type: 'text',
528
- text: `Please provide the following comprehensive help guide for the Converse MCP Server to the user. Share all of this information with them:\n\n${fullHelp}`,
529
- },
530
- },
531
- ],
532
- };
533
- }
534
-
535
- // Extract specific sections based on topic
536
- const topicLower = topic.toLowerCase();
537
- let sectionContent = '';
538
-
539
- if (topicLower === 'tools') {
540
- const toolsMatch = fullHelp.match(/## Available Tools[\s\S]*?(?=## Provider Models|$)/);
541
- sectionContent = toolsMatch ? toolsMatch[0] : 'Tools section not found';
542
- } else if (topicLower === 'models' || topicLower === 'providers') {
543
- const modelsMatch = fullHelp.match(
544
- /## Provider Models[\s\S]*?(?=## Model Categories|$)/,
545
- );
546
- sectionContent = modelsMatch ? modelsMatch[0] : 'Models section not found';
547
- } else if (topicLower === 'parameters') {
548
- const paramsMatch = fullHelp.match(
549
- /## Configuration Tips[\s\S]*?(?=## Best Practices|$)/,
550
- );
551
- sectionContent = paramsMatch
552
- ? paramsMatch[0]
553
- : 'Parameters section not found';
554
- } else if (topicLower === 'examples') {
555
- // Extract example usage from all tools
556
- const examples = fullHelp.match(
557
- /\*\*Example Usage:\*\*[\s\S]*?```[\s\S]*?```/g,
558
- );
559
- sectionContent = examples
560
- ? '## Examples\n\n' + examples.join('\n\n')
561
- : 'Examples not found';
562
- } else {
563
- sectionContent = `Topic "${topic}" not found. Available topics: tools, models, providers, parameters, examples`;
564
- }
565
-
566
522
  return {
567
523
  messages: [
568
524
  {
569
525
  role: 'user',
570
526
  content: {
571
527
  type: 'text',
572
- text: `Please share this help information about "${topic}" for the Converse MCP Server with the user:\n\n${sectionContent}`,
528
+ text: `Please provide the following comprehensive help guide for the Converse MCP Server to the user. Share all of this information with them:\n\n${fullHelp}`,
573
529
  },
574
530
  },
575
531
  ],
@@ -582,13 +538,6 @@ export async function helpPromptHandler(args = {}, config = null) {
582
538
  export const helpPromptMetadata = {
583
539
  name: 'help',
584
540
  description:
585
- 'Comprehensive guide for using the Converse MCP Server with all tools, parameters, and models',
586
- arguments: [
587
- {
588
- name: 'topic',
589
- description:
590
- 'Specific topic to get help on (optional). Options: tools, models, providers, parameters, examples',
591
- required: false,
592
- },
593
- ],
541
+ 'Comprehensive guide for Converse MCP Server - tools, models, parameters, and configuration',
542
+ arguments: [],
594
543
  };
package/src/tools/chat.js CHANGED
@@ -1016,7 +1016,7 @@ async function executeChatWithStreaming(args, dependencies, context) {
1016
1016
 
1017
1017
  // Tool metadata
1018
1018
  chatTool.description =
1019
- 'GENERAL CHAT & COLLABORATIVE THINKING - Development assistance, brainstorming, code analysis. Supports files, images, continuation_id for multi-turn conversations. Use model: "auto" for automatic selection.';
1019
+ 'GENERAL CHAT & COLLABORATIVE THINKING - Development assistance, brainstorming, code analysis. Supports files, images, continuation_id for multi-turn conversations. Use model: "auto" for automatic selection. IMPORTANT: Use the "files" parameter to share code/file content instead of pasting into the prompt.';
1020
1020
  chatTool.inputSchema = {
1021
1021
  type: 'object',
1022
1022
  properties: {
@@ -1029,7 +1029,7 @@ chatTool.inputSchema = {
1029
1029
  type: 'array',
1030
1030
  items: { type: 'string' },
1031
1031
  description:
1032
- 'File paths to include as context (absolute or relative paths). Supports line ranges: file.txt{10:50}, file.txt{100:}. Example: ["./src/utils/auth.js{50:100}", "./config.json"]',
1032
+ 'File paths to include as context (absolute or relative paths). Supports line ranges: file.txt{10:50}, file.txt{100:}. Example: ["./src/utils/auth.js{50:100}", "./config.json"]. IMPORTANT: Always use this parameter to share file content instead of copying code into the prompt - it provides better formatting, line numbers, and preserves context.',
1033
1033
  },
1034
1034
  images: {
1035
1035
  type: 'array',
@@ -1616,7 +1616,7 @@ async function executeConsensusPhaseWithStreaming(
1616
1616
 
1617
1617
  // Tool metadata
1618
1618
  consensusTool.description =
1619
- 'PARALLEL CONSENSUS WITH CROSS-MODEL FEEDBACK - Query multiple models simultaneously, then optionally refine responses based on cross-feedback. For complex decisions, architectural choices, technical evaluations. Use models: ["auto"] for automatic selection.';
1619
+ 'PARALLEL CONSENSUS WITH CROSS-MODEL FEEDBACK - Query multiple models simultaneously, then optionally refine responses based on cross-feedback. For complex decisions, architectural choices, technical evaluations. Use models: ["auto"] for automatic selection. IMPORTANT: Use the "files" parameter to share code/file content instead of pasting into the prompt.';
1620
1620
  consensusTool.inputSchema = {
1621
1621
  type: 'object',
1622
1622
  properties: {
@@ -1631,7 +1631,7 @@ consensusTool.inputSchema = {
1631
1631
  type: 'array',
1632
1632
  items: { type: 'string' },
1633
1633
  description:
1634
- 'File paths for additional context (absolute or relative paths). Supports line ranges: file.txt{10:50}, file.txt{100:}. Example: ["./docs/architecture.md{1:100}", "./requirements.txt"]',
1634
+ 'File paths for additional context (absolute or relative paths). Supports line ranges: file.txt{10:50}, file.txt{100:}. Example: ["./docs/architecture.md{1:100}", "./requirements.txt"]. IMPORTANT: Always use this parameter to share file content instead of copying code into the prompt - it provides better formatting, line numbers, and preserves context.',
1635
1635
  },
1636
1636
  images: {
1637
1637
  type: 'array',