mcp-chat-connect 1.3.0 → 1.3.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.
- package/index.js +5 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -362,6 +362,7 @@ function getTools() {
|
|
|
362
362
|
type: 'object',
|
|
363
363
|
properties: {
|
|
364
364
|
channel_id: { type: 'number', description: 'Channel ID to join' },
|
|
365
|
+
label: { type: 'string', description: 'Custom session label (e.g. "QA Agent", "Security Checker"). Defaults to sequential "Session N".' },
|
|
365
366
|
},
|
|
366
367
|
required: ['channel_id'],
|
|
367
368
|
},
|
|
@@ -490,14 +491,15 @@ async function handleToolCall(name, args) {
|
|
|
490
491
|
connected: true,
|
|
491
492
|
};
|
|
492
493
|
|
|
493
|
-
// Register session to get sequential
|
|
494
|
-
let sessionLabel = 'Session';
|
|
494
|
+
// Register session to get label (custom or sequential)
|
|
495
|
+
let sessionLabel = args.label || 'Session';
|
|
495
496
|
try {
|
|
496
497
|
const regResult = await apiCall('register_session', {
|
|
497
498
|
channel_id: channelId,
|
|
498
499
|
session_token: sessionToken,
|
|
500
|
+
label: args.label || undefined,
|
|
499
501
|
}, sessionState.token);
|
|
500
|
-
sessionLabel = regResult.label ||
|
|
502
|
+
sessionLabel = regResult.label || sessionLabel;
|
|
501
503
|
sessionState.sessionLabel = sessionLabel;
|
|
502
504
|
} catch {}
|
|
503
505
|
|
package/package.json
CHANGED