mcp-memory-keeper 0.10.2 → 0.12.0
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/CHANGELOG.md +46 -1
- package/README.md +86 -0
- package/dist/__tests__/integration/git-integration.test.js +3 -0
- package/dist/__tests__/integration/issue-token-limit-channel-query.test.js +128 -0
- package/dist/__tests__/integration/project-directory.test.js +6 -0
- package/dist/__tests__/integration/tool-profiles-integration.test.js +150 -0
- package/dist/__tests__/utils/project-directory-messages.test.js +3 -0
- package/dist/__tests__/utils/tool-profiles.test.js +374 -0
- package/dist/index.js +1075 -1052
- package/dist/utils/tool-profiles.js +242 -0
- package/examples/config.json +31 -0
- package/examples/project-directory-setup.md +114 -0
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -56,6 +56,7 @@ const simple_git_1 = require("simple-git");
|
|
|
56
56
|
const channels_js_1 = require("./utils/channels.js");
|
|
57
57
|
const token_limits_js_1 = require("./utils/token-limits.js");
|
|
58
58
|
const contextWatchHandlers_js_1 = require("./handlers/contextWatchHandlers.js");
|
|
59
|
+
const tool_profiles_js_1 = require("./utils/tool-profiles.js");
|
|
59
60
|
// Initialize database with migrations
|
|
60
61
|
const dbManager = new database_js_1.DatabaseManager({ filename: 'context.db' });
|
|
61
62
|
exports.dbManager = dbManager;
|
|
@@ -97,6 +98,13 @@ catch (_error) {
|
|
|
97
98
|
}
|
|
98
99
|
// Migration manager is no longer needed - watcher migrations are now applied by DatabaseManager
|
|
99
100
|
// Tables are now created by DatabaseManager in utils/database.ts
|
|
101
|
+
// Resolve active tool profile (TOOL_PROFILE_CONFIG overrides config file path)
|
|
102
|
+
const activeProfile = (0, tool_profiles_js_1.resolveActiveProfile)(process.env.TOOL_PROFILE_CONFIG);
|
|
103
|
+
const enabledTools = activeProfile.tools;
|
|
104
|
+
console.error(`[MCP-Memory-Keeper] Tool profile: "${activeProfile.profileName}" (${enabledTools.size}/${tool_profiles_js_1.ALL_TOOL_NAMES.length} tools, source: ${activeProfile.source})`);
|
|
105
|
+
for (const warning of activeProfile.warnings) {
|
|
106
|
+
console.warn(`[MCP-Memory-Keeper] ${warning}`);
|
|
107
|
+
}
|
|
100
108
|
// Track current session
|
|
101
109
|
let currentSessionId = null;
|
|
102
110
|
// Debug logging utility
|
|
@@ -313,6 +321,20 @@ const server = new index_js_1.Server({
|
|
|
313
321
|
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
|
|
314
322
|
const toolName = request.params.name;
|
|
315
323
|
const args = request.params.arguments;
|
|
324
|
+
// Reject calls to known tools that are disabled by the active profile.
|
|
325
|
+
// Unknown tools fall through to the default switch case for standard error handling.
|
|
326
|
+
if (tool_profiles_js_1.ALL_TOOL_NAMES_SET.has(toolName) && !enabledTools.has(toolName)) {
|
|
327
|
+
const configPath = path.join(os.homedir(), '.mcp-memory-keeper', 'config.json');
|
|
328
|
+
return {
|
|
329
|
+
content: [
|
|
330
|
+
{
|
|
331
|
+
type: 'text',
|
|
332
|
+
text: `Tool "${toolName}" is not available in the current tool profile "${activeProfile.profileName}". To enable it, use TOOL_PROFILE=full or TOOL_PROFILE=standard, or add it to your profile in ${configPath}.`,
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
isError: true,
|
|
336
|
+
};
|
|
337
|
+
}
|
|
316
338
|
switch (toolName) {
|
|
317
339
|
// Session Management
|
|
318
340
|
case 'context_session_start': {
|
|
@@ -3152,1190 +3174,1191 @@ Event ID: ${id.substring(0, 8)}`,
|
|
|
3152
3174
|
throw new Error(`Unknown tool: ${toolName}`);
|
|
3153
3175
|
}
|
|
3154
3176
|
});
|
|
3155
|
-
// List available tools
|
|
3177
|
+
// List available tools (filtered by active tool profile)
|
|
3156
3178
|
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
description: 'Default channel for context items (auto-derived from git branch if not provided)',
|
|
3176
|
-
},
|
|
3179
|
+
const allTools = [
|
|
3180
|
+
// Session Management
|
|
3181
|
+
{
|
|
3182
|
+
name: 'context_session_start',
|
|
3183
|
+
description: 'Start a new context session with optional project directory for git tracking',
|
|
3184
|
+
inputSchema: {
|
|
3185
|
+
type: 'object',
|
|
3186
|
+
properties: {
|
|
3187
|
+
name: { type: 'string', description: 'Session name' },
|
|
3188
|
+
description: { type: 'string', description: 'Session description' },
|
|
3189
|
+
continueFrom: { type: 'string', description: 'Session ID to continue from' },
|
|
3190
|
+
projectDir: {
|
|
3191
|
+
type: 'string',
|
|
3192
|
+
description: 'Project directory path for git tracking (e.g., "/path/to/your/project")',
|
|
3193
|
+
},
|
|
3194
|
+
defaultChannel: {
|
|
3195
|
+
type: 'string',
|
|
3196
|
+
description: 'Default channel for context items (auto-derived from git branch if not provided)',
|
|
3177
3197
|
},
|
|
3178
3198
|
},
|
|
3179
3199
|
},
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3200
|
+
},
|
|
3201
|
+
{
|
|
3202
|
+
name: 'context_session_list',
|
|
3203
|
+
description: 'List recent sessions',
|
|
3204
|
+
inputSchema: {
|
|
3205
|
+
type: 'object',
|
|
3206
|
+
properties: {
|
|
3207
|
+
limit: {
|
|
3208
|
+
type: 'number',
|
|
3209
|
+
description: 'Maximum number of sessions to return',
|
|
3210
|
+
default: 10,
|
|
3191
3211
|
},
|
|
3192
3212
|
},
|
|
3193
3213
|
},
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3214
|
+
},
|
|
3215
|
+
{
|
|
3216
|
+
name: 'context_set_project_dir',
|
|
3217
|
+
description: 'Set the project directory for git tracking in the current session',
|
|
3218
|
+
inputSchema: {
|
|
3219
|
+
type: 'object',
|
|
3220
|
+
properties: {
|
|
3221
|
+
projectDir: {
|
|
3222
|
+
type: 'string',
|
|
3223
|
+
description: 'Project directory path for git tracking (e.g., "/path/to/your/project")',
|
|
3204
3224
|
},
|
|
3205
|
-
required: ['projectDir'],
|
|
3206
3225
|
},
|
|
3226
|
+
required: ['projectDir'],
|
|
3207
3227
|
},
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3228
|
+
},
|
|
3229
|
+
// Enhanced Context Storage
|
|
3230
|
+
{
|
|
3231
|
+
name: 'context_save',
|
|
3232
|
+
description: 'Save a context item with optional category, priority, and privacy setting',
|
|
3233
|
+
inputSchema: {
|
|
3234
|
+
type: 'object',
|
|
3235
|
+
properties: {
|
|
3236
|
+
key: { type: 'string', description: 'Unique key for the context item' },
|
|
3237
|
+
value: { type: 'string', description: 'Context value to save' },
|
|
3238
|
+
category: {
|
|
3239
|
+
type: 'string',
|
|
3240
|
+
description: 'Category (e.g., task, decision, progress)',
|
|
3241
|
+
enum: ['task', 'decision', 'progress', 'note', 'error', 'warning'],
|
|
3242
|
+
},
|
|
3243
|
+
priority: {
|
|
3244
|
+
type: 'string',
|
|
3245
|
+
description: 'Priority level',
|
|
3246
|
+
enum: ['high', 'normal', 'low'],
|
|
3247
|
+
default: 'normal',
|
|
3248
|
+
},
|
|
3249
|
+
private: {
|
|
3250
|
+
type: 'boolean',
|
|
3251
|
+
description: 'If true, item is only accessible from the current session. Default: false (accessible from all sessions)',
|
|
3252
|
+
default: false,
|
|
3253
|
+
},
|
|
3254
|
+
channel: {
|
|
3255
|
+
type: 'string',
|
|
3256
|
+
description: 'Channel to organize this item (uses session default if not provided)',
|
|
3237
3257
|
},
|
|
3238
|
-
required: ['key', 'value'],
|
|
3239
3258
|
},
|
|
3259
|
+
required: ['key', 'value'],
|
|
3240
3260
|
},
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3261
|
+
},
|
|
3262
|
+
{
|
|
3263
|
+
name: 'context_get',
|
|
3264
|
+
description: 'Retrieve saved context by key, category, or session with enhanced filtering. Returns all accessible items (public items + own private items)',
|
|
3265
|
+
inputSchema: {
|
|
3266
|
+
type: 'object',
|
|
3267
|
+
properties: {
|
|
3268
|
+
key: { type: 'string', description: 'Specific key to retrieve' },
|
|
3269
|
+
category: { type: 'string', description: 'Filter by category' },
|
|
3270
|
+
sessionId: { type: 'string', description: 'Specific session ID (defaults to current)' },
|
|
3271
|
+
channel: { type: 'string', description: 'Filter by single channel' },
|
|
3272
|
+
channels: {
|
|
3273
|
+
type: 'array',
|
|
3274
|
+
items: { type: 'string' },
|
|
3275
|
+
description: 'Filter by multiple channels',
|
|
3276
|
+
},
|
|
3277
|
+
includeMetadata: {
|
|
3278
|
+
type: 'boolean',
|
|
3279
|
+
description: 'Include timestamps and size info',
|
|
3280
|
+
},
|
|
3281
|
+
sort: {
|
|
3282
|
+
type: 'string',
|
|
3283
|
+
enum: ['created_desc', 'created_asc', 'updated_desc', 'key_asc', 'key_desc'],
|
|
3284
|
+
description: 'Sort order for results',
|
|
3285
|
+
},
|
|
3286
|
+
limit: {
|
|
3287
|
+
type: 'number',
|
|
3288
|
+
description: 'Maximum items to return. Must be a positive integer. Invalid values will cause validation error. (default: auto-derived)',
|
|
3289
|
+
},
|
|
3290
|
+
offset: {
|
|
3291
|
+
type: 'number',
|
|
3292
|
+
description: 'Pagination offset. Must be a non-negative integer. Invalid values will cause validation error. (default: 0)',
|
|
3293
|
+
},
|
|
3294
|
+
createdAfter: {
|
|
3295
|
+
type: 'string',
|
|
3296
|
+
description: 'ISO date - items created after this time',
|
|
3297
|
+
},
|
|
3298
|
+
createdBefore: {
|
|
3299
|
+
type: 'string',
|
|
3300
|
+
description: 'ISO date - items created before this time',
|
|
3301
|
+
},
|
|
3302
|
+
keyPattern: {
|
|
3303
|
+
type: 'string',
|
|
3304
|
+
description: 'Regex pattern for key matching',
|
|
3305
|
+
},
|
|
3306
|
+
priorities: {
|
|
3307
|
+
type: 'array',
|
|
3308
|
+
items: { type: 'string', enum: ['high', 'normal', 'low'] },
|
|
3309
|
+
description: 'Filter by priority levels',
|
|
3290
3310
|
},
|
|
3291
3311
|
},
|
|
3292
3312
|
},
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
},
|
|
3303
|
-
required: ['filePath', 'content'],
|
|
3313
|
+
},
|
|
3314
|
+
// File Caching
|
|
3315
|
+
{
|
|
3316
|
+
name: 'context_cache_file',
|
|
3317
|
+
description: 'Cache file content with hash for change detection',
|
|
3318
|
+
inputSchema: {
|
|
3319
|
+
type: 'object',
|
|
3320
|
+
properties: {
|
|
3321
|
+
filePath: { type: 'string', description: 'Path to the file' },
|
|
3322
|
+
content: { type: 'string', description: 'File content to cache' },
|
|
3304
3323
|
},
|
|
3324
|
+
required: ['filePath', 'content'],
|
|
3305
3325
|
},
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
},
|
|
3315
|
-
required: ['filePath'],
|
|
3326
|
+
},
|
|
3327
|
+
{
|
|
3328
|
+
name: 'context_file_changed',
|
|
3329
|
+
description: 'Check if a file has changed since it was cached',
|
|
3330
|
+
inputSchema: {
|
|
3331
|
+
type: 'object',
|
|
3332
|
+
properties: {
|
|
3333
|
+
filePath: { type: 'string', description: 'Path to the file' },
|
|
3334
|
+
currentContent: { type: 'string', description: 'Current file content to compare' },
|
|
3316
3335
|
},
|
|
3336
|
+
required: ['filePath'],
|
|
3317
3337
|
},
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
},
|
|
3338
|
+
},
|
|
3339
|
+
// Status
|
|
3340
|
+
{
|
|
3341
|
+
name: 'context_status',
|
|
3342
|
+
description: 'Get current context status and statistics',
|
|
3343
|
+
inputSchema: {
|
|
3344
|
+
type: 'object',
|
|
3345
|
+
properties: {},
|
|
3326
3346
|
},
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3347
|
+
},
|
|
3348
|
+
// Phase 2: Checkpoint System
|
|
3349
|
+
{
|
|
3350
|
+
name: 'context_checkpoint',
|
|
3351
|
+
description: 'Create a named checkpoint of current context',
|
|
3352
|
+
inputSchema: {
|
|
3353
|
+
type: 'object',
|
|
3354
|
+
properties: {
|
|
3355
|
+
name: { type: 'string', description: 'Checkpoint name' },
|
|
3356
|
+
description: { type: 'string', description: 'Checkpoint description' },
|
|
3357
|
+
includeFiles: {
|
|
3358
|
+
type: 'boolean',
|
|
3359
|
+
description: 'Include cached files in checkpoint',
|
|
3360
|
+
default: true,
|
|
3361
|
+
},
|
|
3362
|
+
includeGitStatus: {
|
|
3363
|
+
type: 'boolean',
|
|
3364
|
+
description: 'Capture current git status',
|
|
3365
|
+
default: true,
|
|
3346
3366
|
},
|
|
3347
|
-
required: ['name'],
|
|
3348
3367
|
},
|
|
3368
|
+
required: ['name'],
|
|
3349
3369
|
},
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3370
|
+
},
|
|
3371
|
+
{
|
|
3372
|
+
name: 'context_restore_checkpoint',
|
|
3373
|
+
description: 'Restore context from a checkpoint',
|
|
3374
|
+
inputSchema: {
|
|
3375
|
+
type: 'object',
|
|
3376
|
+
properties: {
|
|
3377
|
+
name: { type: 'string', description: 'Checkpoint name to restore' },
|
|
3378
|
+
checkpointId: { type: 'string', description: 'Specific checkpoint ID' },
|
|
3379
|
+
restoreFiles: {
|
|
3380
|
+
type: 'boolean',
|
|
3381
|
+
description: 'Restore cached files',
|
|
3382
|
+
default: true,
|
|
3363
3383
|
},
|
|
3364
3384
|
},
|
|
3365
3385
|
},
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3386
|
+
},
|
|
3387
|
+
// Phase 2: Summarization
|
|
3388
|
+
{
|
|
3389
|
+
name: 'context_summarize',
|
|
3390
|
+
description: 'Get AI-friendly summary of session context',
|
|
3391
|
+
inputSchema: {
|
|
3392
|
+
type: 'object',
|
|
3393
|
+
properties: {
|
|
3394
|
+
sessionId: {
|
|
3395
|
+
type: 'string',
|
|
3396
|
+
description: 'Session to summarize (defaults to current)',
|
|
3397
|
+
},
|
|
3398
|
+
categories: {
|
|
3399
|
+
type: 'array',
|
|
3400
|
+
items: { type: 'string' },
|
|
3401
|
+
description: 'Filter by specific categories',
|
|
3402
|
+
},
|
|
3403
|
+
maxLength: {
|
|
3404
|
+
type: 'number',
|
|
3405
|
+
description: 'Maximum summary length',
|
|
3406
|
+
default: 1000,
|
|
3387
3407
|
},
|
|
3388
3408
|
},
|
|
3389
3409
|
},
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
},
|
|
3410
|
+
},
|
|
3411
|
+
// Phase 3: Smart Compaction
|
|
3412
|
+
{
|
|
3413
|
+
name: 'context_prepare_compaction',
|
|
3414
|
+
description: 'Automatically save critical context before compaction',
|
|
3415
|
+
inputSchema: {
|
|
3416
|
+
type: 'object',
|
|
3417
|
+
properties: {},
|
|
3398
3418
|
},
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3419
|
+
},
|
|
3420
|
+
// Phase 3: Git Integration
|
|
3421
|
+
{
|
|
3422
|
+
name: 'context_git_commit',
|
|
3423
|
+
description: 'Create git commit with automatic context save',
|
|
3424
|
+
inputSchema: {
|
|
3425
|
+
type: 'object',
|
|
3426
|
+
properties: {
|
|
3427
|
+
message: { type: 'string', description: 'Commit message' },
|
|
3428
|
+
autoSave: {
|
|
3429
|
+
type: 'boolean',
|
|
3430
|
+
description: 'Automatically save context state',
|
|
3431
|
+
default: true,
|
|
3412
3432
|
},
|
|
3413
|
-
required: ['message'],
|
|
3414
3433
|
},
|
|
3434
|
+
required: ['message'],
|
|
3415
3435
|
},
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3436
|
+
},
|
|
3437
|
+
// Phase 3: Search
|
|
3438
|
+
{
|
|
3439
|
+
name: 'context_search',
|
|
3440
|
+
description: 'Search through saved context items with advanced filtering',
|
|
3441
|
+
inputSchema: {
|
|
3442
|
+
type: 'object',
|
|
3443
|
+
properties: {
|
|
3444
|
+
query: { type: 'string', description: 'Search query' },
|
|
3445
|
+
searchIn: {
|
|
3446
|
+
type: 'array',
|
|
3447
|
+
items: { type: 'string', enum: ['key', 'value'] },
|
|
3448
|
+
description: 'Fields to search in',
|
|
3449
|
+
default: ['key', 'value'],
|
|
3450
|
+
},
|
|
3451
|
+
sessionId: { type: 'string', description: 'Session to search (defaults to current)' },
|
|
3452
|
+
category: { type: 'string', description: 'Filter by category' },
|
|
3453
|
+
channel: { type: 'string', description: 'Filter by single channel' },
|
|
3454
|
+
channels: {
|
|
3455
|
+
type: 'array',
|
|
3456
|
+
items: { type: 'string' },
|
|
3457
|
+
description: 'Filter by multiple channels',
|
|
3458
|
+
},
|
|
3459
|
+
createdAfter: {
|
|
3460
|
+
type: 'string',
|
|
3461
|
+
description: 'ISO date - items created after this time',
|
|
3462
|
+
},
|
|
3463
|
+
createdBefore: {
|
|
3464
|
+
type: 'string',
|
|
3465
|
+
description: 'ISO date - items created before this time',
|
|
3466
|
+
},
|
|
3467
|
+
relativeTime: {
|
|
3468
|
+
type: 'string',
|
|
3469
|
+
description: 'Natural language time (e.g., "2 hours ago", "yesterday")',
|
|
3470
|
+
},
|
|
3471
|
+
keyPattern: {
|
|
3472
|
+
type: 'string',
|
|
3473
|
+
description: 'Pattern for key matching (uses GLOB syntax)',
|
|
3474
|
+
},
|
|
3475
|
+
priorities: {
|
|
3476
|
+
type: 'array',
|
|
3477
|
+
items: { type: 'string', enum: ['high', 'normal', 'low'] },
|
|
3478
|
+
description: 'Filter by priority levels',
|
|
3479
|
+
},
|
|
3480
|
+
sort: {
|
|
3481
|
+
type: 'string',
|
|
3482
|
+
enum: ['created_desc', 'created_asc', 'updated_desc', 'key_asc', 'key_desc'],
|
|
3483
|
+
description: 'Sort order for results',
|
|
3484
|
+
},
|
|
3485
|
+
limit: {
|
|
3486
|
+
type: 'number',
|
|
3487
|
+
description: 'Maximum items to return. Must be a positive integer. Invalid values will cause validation error. (default: auto-derived)',
|
|
3488
|
+
},
|
|
3489
|
+
offset: {
|
|
3490
|
+
type: 'number',
|
|
3491
|
+
description: 'Pagination offset. Must be a non-negative integer. Invalid values will cause validation error. (default: 0)',
|
|
3492
|
+
},
|
|
3493
|
+
includeMetadata: {
|
|
3494
|
+
type: 'boolean',
|
|
3495
|
+
description: 'Include timestamps and size info',
|
|
3476
3496
|
},
|
|
3477
|
-
required: ['query'],
|
|
3478
3497
|
},
|
|
3498
|
+
required: ['query'],
|
|
3479
3499
|
},
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
+
},
|
|
3501
|
+
// Cross-Session Collaboration
|
|
3502
|
+
// REMOVED: Sharing is now automatic (public by default)
|
|
3503
|
+
/*
|
|
3504
|
+
{
|
|
3505
|
+
name: 'context_share',
|
|
3506
|
+
description: 'Share a context item with other sessions for cross-session collaboration',
|
|
3507
|
+
inputSchema: {
|
|
3508
|
+
type: 'object',
|
|
3509
|
+
properties: {
|
|
3510
|
+
key: { type: 'string', description: 'Key of the item to share' },
|
|
3511
|
+
targetSessions: {
|
|
3512
|
+
type: 'array',
|
|
3513
|
+
items: { type: 'string' },
|
|
3514
|
+
description: 'Session IDs to share with (empty for public sharing)'
|
|
3515
|
+
},
|
|
3516
|
+
makePublic: {
|
|
3517
|
+
type: 'boolean',
|
|
3518
|
+
description: 'Share with all sessions',
|
|
3519
|
+
default: false
|
|
3500
3520
|
},
|
|
3501
|
-
required: ['key'],
|
|
3502
3521
|
},
|
|
3522
|
+
required: ['key'],
|
|
3503
3523
|
},
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3524
|
+
},
|
|
3525
|
+
*/
|
|
3526
|
+
// REMOVED: All accessible items are retrieved via context_get
|
|
3527
|
+
/*
|
|
3528
|
+
{
|
|
3529
|
+
name: 'context_get_shared',
|
|
3530
|
+
description: 'Get shared context items from other sessions',
|
|
3531
|
+
inputSchema: {
|
|
3532
|
+
type: 'object',
|
|
3533
|
+
properties: {
|
|
3534
|
+
includeAll: {
|
|
3535
|
+
type: 'boolean',
|
|
3536
|
+
description: 'Include all shared items from all sessions',
|
|
3537
|
+
default: false
|
|
3518
3538
|
},
|
|
3519
3539
|
},
|
|
3520
3540
|
},
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3541
|
+
},
|
|
3542
|
+
*/
|
|
3543
|
+
{
|
|
3544
|
+
name: 'context_search_all',
|
|
3545
|
+
description: 'Search across multiple or all sessions with pagination support',
|
|
3546
|
+
inputSchema: {
|
|
3547
|
+
type: 'object',
|
|
3548
|
+
properties: {
|
|
3549
|
+
query: { type: 'string', description: 'Search query' },
|
|
3550
|
+
sessions: {
|
|
3551
|
+
type: 'array',
|
|
3552
|
+
items: { type: 'string' },
|
|
3553
|
+
description: 'Session IDs to search (empty for all sessions)',
|
|
3554
|
+
},
|
|
3555
|
+
includeShared: {
|
|
3556
|
+
type: 'boolean',
|
|
3557
|
+
description: 'Include shared items in search',
|
|
3558
|
+
default: true,
|
|
3559
|
+
},
|
|
3560
|
+
limit: {
|
|
3561
|
+
type: 'number',
|
|
3562
|
+
description: 'Maximum number of items to return. Must be a positive integer between 1-100. Non-integer values will be rejected with validation error. (default: 25)',
|
|
3563
|
+
minimum: 1,
|
|
3564
|
+
maximum: 100,
|
|
3565
|
+
default: 25,
|
|
3566
|
+
},
|
|
3567
|
+
offset: {
|
|
3568
|
+
type: 'number',
|
|
3569
|
+
description: 'Number of items to skip for pagination. Must be a non-negative integer (0 or higher). Non-integer values will be rejected with validation error. (default: 0)',
|
|
3570
|
+
minimum: 0,
|
|
3571
|
+
default: 0,
|
|
3572
|
+
},
|
|
3573
|
+
sort: {
|
|
3574
|
+
type: 'string',
|
|
3575
|
+
description: 'Sort order for results',
|
|
3576
|
+
enum: ['created_desc', 'created_asc', 'updated_desc', 'key_asc', 'key_desc'],
|
|
3577
|
+
default: 'created_desc',
|
|
3578
|
+
},
|
|
3579
|
+
category: {
|
|
3580
|
+
type: 'string',
|
|
3581
|
+
description: 'Filter by category',
|
|
3582
|
+
enum: ['task', 'decision', 'progress', 'note', 'error', 'warning'],
|
|
3583
|
+
},
|
|
3584
|
+
channel: {
|
|
3585
|
+
type: 'string',
|
|
3586
|
+
description: 'Filter by single channel',
|
|
3587
|
+
},
|
|
3588
|
+
channels: {
|
|
3589
|
+
type: 'array',
|
|
3590
|
+
items: { type: 'string' },
|
|
3591
|
+
description: 'Filter by multiple channels',
|
|
3592
|
+
},
|
|
3593
|
+
priorities: {
|
|
3594
|
+
type: 'array',
|
|
3595
|
+
items: { type: 'string', enum: ['high', 'normal', 'low'] },
|
|
3596
|
+
description: 'Filter by priority levels',
|
|
3597
|
+
},
|
|
3598
|
+
createdAfter: {
|
|
3599
|
+
type: 'string',
|
|
3600
|
+
description: 'Filter items created after this date (ISO format or relative time)',
|
|
3601
|
+
},
|
|
3602
|
+
createdBefore: {
|
|
3603
|
+
type: 'string',
|
|
3604
|
+
description: 'Filter items created before this date (ISO format or relative time)',
|
|
3605
|
+
},
|
|
3606
|
+
keyPattern: {
|
|
3607
|
+
type: 'string',
|
|
3608
|
+
description: 'Pattern to match keys (supports wildcards: *, ?)',
|
|
3609
|
+
},
|
|
3610
|
+
searchIn: {
|
|
3611
|
+
type: 'array',
|
|
3612
|
+
items: { type: 'string', enum: ['key', 'value'] },
|
|
3613
|
+
description: 'Fields to search in',
|
|
3614
|
+
default: ['key', 'value'],
|
|
3615
|
+
},
|
|
3616
|
+
includeMetadata: {
|
|
3617
|
+
type: 'boolean',
|
|
3618
|
+
description: 'Include timestamps and size info',
|
|
3619
|
+
default: false,
|
|
3600
3620
|
},
|
|
3601
|
-
required: ['query'],
|
|
3602
3621
|
},
|
|
3622
|
+
required: ['query'],
|
|
3603
3623
|
},
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3624
|
+
},
|
|
3625
|
+
// Phase 3: Export/Import
|
|
3626
|
+
{
|
|
3627
|
+
name: 'context_export',
|
|
3628
|
+
description: 'Export session data for backup or sharing',
|
|
3629
|
+
inputSchema: {
|
|
3630
|
+
type: 'object',
|
|
3631
|
+
properties: {
|
|
3632
|
+
sessionId: { type: 'string', description: 'Session to export (defaults to current)' },
|
|
3633
|
+
format: {
|
|
3634
|
+
type: 'string',
|
|
3635
|
+
enum: ['json', 'inline'],
|
|
3636
|
+
description: 'Export format',
|
|
3637
|
+
default: 'json',
|
|
3618
3638
|
},
|
|
3619
3639
|
},
|
|
3620
3640
|
},
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3641
|
+
},
|
|
3642
|
+
{
|
|
3643
|
+
name: 'context_import',
|
|
3644
|
+
description: 'Import previously exported session data',
|
|
3645
|
+
inputSchema: {
|
|
3646
|
+
type: 'object',
|
|
3647
|
+
properties: {
|
|
3648
|
+
filePath: { type: 'string', description: 'Path to import file' },
|
|
3649
|
+
merge: {
|
|
3650
|
+
type: 'boolean',
|
|
3651
|
+
description: 'Merge with current session instead of creating new',
|
|
3652
|
+
default: false,
|
|
3633
3653
|
},
|
|
3634
|
-
required: ['filePath'],
|
|
3635
3654
|
},
|
|
3655
|
+
required: ['filePath'],
|
|
3636
3656
|
},
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3657
|
+
},
|
|
3658
|
+
// Phase 4.1: Knowledge Graph
|
|
3659
|
+
{
|
|
3660
|
+
name: 'context_analyze',
|
|
3661
|
+
description: 'Analyze context to extract entities and relationships',
|
|
3662
|
+
inputSchema: {
|
|
3663
|
+
type: 'object',
|
|
3664
|
+
properties: {
|
|
3665
|
+
sessionId: {
|
|
3666
|
+
type: 'string',
|
|
3667
|
+
description: 'Session ID to analyze (defaults to current)',
|
|
3668
|
+
},
|
|
3669
|
+
categories: {
|
|
3670
|
+
type: 'array',
|
|
3671
|
+
items: { type: 'string' },
|
|
3672
|
+
description: 'Categories to analyze',
|
|
3653
3673
|
},
|
|
3654
3674
|
},
|
|
3655
3675
|
},
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3676
|
+
},
|
|
3677
|
+
{
|
|
3678
|
+
name: 'context_find_related',
|
|
3679
|
+
description: 'Find entities related to a key or entity',
|
|
3680
|
+
inputSchema: {
|
|
3681
|
+
type: 'object',
|
|
3682
|
+
properties: {
|
|
3683
|
+
key: { type: 'string', description: 'Context key or entity name' },
|
|
3684
|
+
relationTypes: {
|
|
3685
|
+
type: 'array',
|
|
3686
|
+
items: { type: 'string' },
|
|
3687
|
+
description: 'Types of relations to include',
|
|
3688
|
+
},
|
|
3689
|
+
maxDepth: {
|
|
3690
|
+
type: 'number',
|
|
3691
|
+
description: 'Maximum graph traversal depth',
|
|
3692
|
+
default: 2,
|
|
3673
3693
|
},
|
|
3674
|
-
required: ['key'],
|
|
3675
3694
|
},
|
|
3695
|
+
required: ['key'],
|
|
3676
3696
|
},
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
name: 'context_visualize',
|
|
3700
|
+
description: 'Generate visualization data for the knowledge graph',
|
|
3701
|
+
inputSchema: {
|
|
3702
|
+
type: 'object',
|
|
3703
|
+
properties: {
|
|
3704
|
+
type: {
|
|
3705
|
+
type: 'string',
|
|
3706
|
+
enum: ['graph', 'timeline', 'heatmap'],
|
|
3707
|
+
description: 'Visualization type',
|
|
3708
|
+
default: 'graph',
|
|
3709
|
+
},
|
|
3710
|
+
entityTypes: {
|
|
3711
|
+
type: 'array',
|
|
3712
|
+
items: { type: 'string' },
|
|
3713
|
+
description: 'Entity types to include',
|
|
3714
|
+
},
|
|
3715
|
+
sessionId: {
|
|
3716
|
+
type: 'string',
|
|
3717
|
+
description: 'Session to visualize (defaults to current)',
|
|
3698
3718
|
},
|
|
3699
3719
|
},
|
|
3700
3720
|
},
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3721
|
+
},
|
|
3722
|
+
// Phase 4.2: Semantic Search
|
|
3723
|
+
{
|
|
3724
|
+
name: 'context_semantic_search',
|
|
3725
|
+
description: 'Search context using natural language queries',
|
|
3726
|
+
inputSchema: {
|
|
3727
|
+
type: 'object',
|
|
3728
|
+
properties: {
|
|
3729
|
+
query: { type: 'string', description: 'Natural language search query' },
|
|
3730
|
+
topK: {
|
|
3731
|
+
type: 'number',
|
|
3732
|
+
description: 'Number of results to return',
|
|
3733
|
+
default: 10,
|
|
3734
|
+
},
|
|
3735
|
+
minSimilarity: {
|
|
3736
|
+
type: 'number',
|
|
3737
|
+
description: 'Minimum similarity score (0-1)',
|
|
3738
|
+
default: 0.3,
|
|
3739
|
+
},
|
|
3740
|
+
sessionId: {
|
|
3741
|
+
type: 'string',
|
|
3742
|
+
description: 'Search within specific session (defaults to current)',
|
|
3723
3743
|
},
|
|
3724
|
-
required: ['query'],
|
|
3725
3744
|
},
|
|
3745
|
+
required: ['query'],
|
|
3726
3746
|
},
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3747
|
+
},
|
|
3748
|
+
// Phase 4.3: Multi-Agent System
|
|
3749
|
+
{
|
|
3750
|
+
name: 'context_delegate',
|
|
3751
|
+
description: 'Delegate complex analysis tasks to specialized agents',
|
|
3752
|
+
inputSchema: {
|
|
3753
|
+
type: 'object',
|
|
3754
|
+
properties: {
|
|
3755
|
+
taskType: {
|
|
3756
|
+
type: 'string',
|
|
3757
|
+
enum: ['analyze', 'synthesize'],
|
|
3758
|
+
description: 'Type of task to delegate',
|
|
3759
|
+
},
|
|
3760
|
+
input: {
|
|
3761
|
+
type: 'object',
|
|
3762
|
+
properties: {
|
|
3763
|
+
analysisType: {
|
|
3764
|
+
type: 'string',
|
|
3765
|
+
enum: ['patterns', 'relationships', 'trends', 'comprehensive'],
|
|
3766
|
+
description: 'For analyze tasks: type of analysis',
|
|
3767
|
+
},
|
|
3768
|
+
synthesisType: {
|
|
3769
|
+
type: 'string',
|
|
3770
|
+
enum: ['summary', 'merge', 'recommendations'],
|
|
3771
|
+
description: 'For synthesize tasks: type of synthesis',
|
|
3772
|
+
},
|
|
3773
|
+
categories: {
|
|
3774
|
+
type: 'array',
|
|
3775
|
+
items: { type: 'string' },
|
|
3776
|
+
description: 'Categories to include in analysis',
|
|
3777
|
+
},
|
|
3778
|
+
timeframe: {
|
|
3779
|
+
type: 'string',
|
|
3780
|
+
description: 'Time period for analysis (e.g., "-7 days")',
|
|
3781
|
+
},
|
|
3782
|
+
maxLength: {
|
|
3783
|
+
type: 'number',
|
|
3784
|
+
description: 'Maximum length for summaries',
|
|
3785
|
+
},
|
|
3786
|
+
insights: {
|
|
3787
|
+
type: 'array',
|
|
3788
|
+
description: 'For merge synthesis: array of insights to merge',
|
|
3769
3789
|
},
|
|
3770
3790
|
},
|
|
3771
|
-
chain: {
|
|
3772
|
-
type: 'boolean',
|
|
3773
|
-
description: 'Process multiple tasks in sequence',
|
|
3774
|
-
default: false,
|
|
3775
|
-
},
|
|
3776
|
-
sessionId: { type: 'string', description: 'Session to analyze (defaults to current)' },
|
|
3777
3791
|
},
|
|
3778
|
-
|
|
3792
|
+
chain: {
|
|
3793
|
+
type: 'boolean',
|
|
3794
|
+
description: 'Process multiple tasks in sequence',
|
|
3795
|
+
default: false,
|
|
3796
|
+
},
|
|
3797
|
+
sessionId: { type: 'string', description: 'Session to analyze (defaults to current)' },
|
|
3779
3798
|
},
|
|
3799
|
+
required: ['taskType', 'input'],
|
|
3780
3800
|
},
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3801
|
+
},
|
|
3802
|
+
// Phase 4.4: Advanced Features
|
|
3803
|
+
{
|
|
3804
|
+
name: 'context_branch_session',
|
|
3805
|
+
description: 'Create a branch from current session for exploring alternatives',
|
|
3806
|
+
inputSchema: {
|
|
3807
|
+
type: 'object',
|
|
3808
|
+
properties: {
|
|
3809
|
+
branchName: {
|
|
3810
|
+
type: 'string',
|
|
3811
|
+
description: 'Name for the new branch',
|
|
3812
|
+
},
|
|
3813
|
+
copyDepth: {
|
|
3814
|
+
type: 'string',
|
|
3815
|
+
enum: ['shallow', 'deep'],
|
|
3816
|
+
description: 'How much to copy: shallow (high priority only) or deep (everything)',
|
|
3817
|
+
default: 'shallow',
|
|
3798
3818
|
},
|
|
3799
|
-
required: ['branchName'],
|
|
3800
3819
|
},
|
|
3820
|
+
required: ['branchName'],
|
|
3801
3821
|
},
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3822
|
+
},
|
|
3823
|
+
{
|
|
3824
|
+
name: 'context_merge_sessions',
|
|
3825
|
+
description: 'Merge another session into the current one',
|
|
3826
|
+
inputSchema: {
|
|
3827
|
+
type: 'object',
|
|
3828
|
+
properties: {
|
|
3829
|
+
sourceSessionId: {
|
|
3830
|
+
type: 'string',
|
|
3831
|
+
description: 'ID of the session to merge from',
|
|
3832
|
+
},
|
|
3833
|
+
conflictResolution: {
|
|
3834
|
+
type: 'string',
|
|
3835
|
+
enum: ['keep_current', 'keep_source', 'keep_newest'],
|
|
3836
|
+
description: 'How to resolve conflicts',
|
|
3837
|
+
default: 'keep_current',
|
|
3818
3838
|
},
|
|
3819
|
-
required: ['sourceSessionId'],
|
|
3820
3839
|
},
|
|
3840
|
+
required: ['sourceSessionId'],
|
|
3821
3841
|
},
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3842
|
+
},
|
|
3843
|
+
{
|
|
3844
|
+
name: 'context_journal_entry',
|
|
3845
|
+
description: 'Add a timestamped journal entry with optional tags and mood',
|
|
3846
|
+
inputSchema: {
|
|
3847
|
+
type: 'object',
|
|
3848
|
+
properties: {
|
|
3849
|
+
entry: {
|
|
3850
|
+
type: 'string',
|
|
3851
|
+
description: 'Journal entry text',
|
|
3852
|
+
},
|
|
3853
|
+
tags: {
|
|
3854
|
+
type: 'array',
|
|
3855
|
+
items: { type: 'string' },
|
|
3856
|
+
description: 'Tags for categorization',
|
|
3857
|
+
},
|
|
3858
|
+
mood: {
|
|
3859
|
+
type: 'string',
|
|
3860
|
+
description: 'Current mood/feeling',
|
|
3841
3861
|
},
|
|
3842
|
-
required: ['entry'],
|
|
3843
3862
|
},
|
|
3863
|
+
required: ['entry'],
|
|
3844
3864
|
},
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3865
|
+
},
|
|
3866
|
+
{
|
|
3867
|
+
name: 'context_timeline',
|
|
3868
|
+
description: 'Get timeline of activities with optional grouping',
|
|
3869
|
+
inputSchema: {
|
|
3870
|
+
type: 'object',
|
|
3871
|
+
properties: {
|
|
3872
|
+
startDate: {
|
|
3873
|
+
type: 'string',
|
|
3874
|
+
description: 'Start date (ISO format)',
|
|
3875
|
+
},
|
|
3876
|
+
endDate: {
|
|
3877
|
+
type: 'string',
|
|
3878
|
+
description: 'End date (ISO format)',
|
|
3879
|
+
},
|
|
3880
|
+
groupBy: {
|
|
3881
|
+
type: 'string',
|
|
3882
|
+
enum: ['hour', 'day', 'week'],
|
|
3883
|
+
description: 'How to group timeline data',
|
|
3884
|
+
default: 'day',
|
|
3885
|
+
},
|
|
3886
|
+
sessionId: {
|
|
3887
|
+
type: 'string',
|
|
3888
|
+
description: 'Session to analyze (defaults to current)',
|
|
3889
|
+
},
|
|
3890
|
+
includeItems: {
|
|
3891
|
+
type: 'boolean',
|
|
3892
|
+
description: 'Include item details in timeline',
|
|
3893
|
+
},
|
|
3894
|
+
categories: {
|
|
3895
|
+
type: 'array',
|
|
3896
|
+
items: { type: 'string' },
|
|
3897
|
+
description: 'Filter by categories',
|
|
3898
|
+
},
|
|
3899
|
+
relativeTime: {
|
|
3900
|
+
type: 'string',
|
|
3901
|
+
description: 'Natural language time (e.g., "2 hours ago", "today")',
|
|
3902
|
+
},
|
|
3903
|
+
itemsPerPeriod: {
|
|
3904
|
+
type: 'number',
|
|
3905
|
+
description: 'Max items per time period',
|
|
3906
|
+
},
|
|
3907
|
+
minItemsPerPeriod: {
|
|
3908
|
+
type: 'number',
|
|
3909
|
+
description: 'Only include periods with at least N items',
|
|
3910
|
+
},
|
|
3911
|
+
showEmpty: {
|
|
3912
|
+
type: 'boolean',
|
|
3913
|
+
description: 'Include periods with 0 items (default: false)',
|
|
3894
3914
|
},
|
|
3895
3915
|
},
|
|
3896
3916
|
},
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3917
|
+
},
|
|
3918
|
+
{
|
|
3919
|
+
name: 'context_compress',
|
|
3920
|
+
description: 'Intelligently compress old context to save space',
|
|
3921
|
+
inputSchema: {
|
|
3922
|
+
type: 'object',
|
|
3923
|
+
properties: {
|
|
3924
|
+
olderThan: {
|
|
3925
|
+
type: 'string',
|
|
3926
|
+
description: 'Compress items older than this date (ISO format)',
|
|
3927
|
+
},
|
|
3928
|
+
preserveCategories: {
|
|
3929
|
+
type: 'array',
|
|
3930
|
+
items: { type: 'string' },
|
|
3931
|
+
description: 'Categories to preserve (not compress)',
|
|
3932
|
+
},
|
|
3933
|
+
targetSize: {
|
|
3934
|
+
type: 'number',
|
|
3935
|
+
description: 'Target size in KB (optional)',
|
|
3936
|
+
},
|
|
3937
|
+
sessionId: {
|
|
3938
|
+
type: 'string',
|
|
3939
|
+
description: 'Session to compress (defaults to current)',
|
|
3920
3940
|
},
|
|
3921
3941
|
},
|
|
3922
3942
|
},
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3943
|
+
},
|
|
3944
|
+
{
|
|
3945
|
+
name: 'context_integrate_tool',
|
|
3946
|
+
description: 'Track events from other MCP tools',
|
|
3947
|
+
inputSchema: {
|
|
3948
|
+
type: 'object',
|
|
3949
|
+
properties: {
|
|
3950
|
+
toolName: {
|
|
3951
|
+
type: 'string',
|
|
3952
|
+
description: 'Name of the tool',
|
|
3953
|
+
},
|
|
3954
|
+
eventType: {
|
|
3955
|
+
type: 'string',
|
|
3956
|
+
description: 'Type of event',
|
|
3957
|
+
},
|
|
3958
|
+
data: {
|
|
3959
|
+
type: 'object',
|
|
3960
|
+
description: 'Event data',
|
|
3961
|
+
properties: {
|
|
3962
|
+
important: {
|
|
3963
|
+
type: 'boolean',
|
|
3964
|
+
description: 'Mark as important to save as context item',
|
|
3945
3965
|
},
|
|
3946
3966
|
},
|
|
3947
3967
|
},
|
|
3948
|
-
required: ['toolName', 'eventType', 'data'],
|
|
3949
3968
|
},
|
|
3969
|
+
required: ['toolName', 'eventType', 'data'],
|
|
3950
3970
|
},
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3971
|
+
},
|
|
3972
|
+
{
|
|
3973
|
+
name: 'context_diff',
|
|
3974
|
+
description: 'Get changes to context items since a specific point in time (timestamp, checkpoint, or relative time)',
|
|
3975
|
+
inputSchema: {
|
|
3976
|
+
type: 'object',
|
|
3977
|
+
properties: {
|
|
3978
|
+
since: {
|
|
3979
|
+
type: 'string',
|
|
3980
|
+
description: 'Point in time to compare against (ISO timestamp, checkpoint name/ID, or relative time like "2 hours ago")',
|
|
3981
|
+
},
|
|
3982
|
+
sessionId: {
|
|
3983
|
+
type: 'string',
|
|
3984
|
+
description: 'Session ID to analyze (defaults to current)',
|
|
3985
|
+
},
|
|
3986
|
+
category: {
|
|
3987
|
+
type: 'string',
|
|
3988
|
+
description: 'Filter by category',
|
|
3989
|
+
},
|
|
3990
|
+
channel: {
|
|
3991
|
+
type: 'string',
|
|
3992
|
+
description: 'Filter by single channel',
|
|
3993
|
+
},
|
|
3994
|
+
channels: {
|
|
3995
|
+
type: 'array',
|
|
3996
|
+
items: { type: 'string' },
|
|
3997
|
+
description: 'Filter by multiple channels',
|
|
3998
|
+
},
|
|
3999
|
+
includeValues: {
|
|
4000
|
+
type: 'boolean',
|
|
4001
|
+
description: 'Include full item values in response',
|
|
4002
|
+
default: true,
|
|
4003
|
+
},
|
|
4004
|
+
limit: {
|
|
4005
|
+
type: 'number',
|
|
4006
|
+
description: 'Maximum items per category (added/modified)',
|
|
4007
|
+
},
|
|
4008
|
+
offset: {
|
|
4009
|
+
type: 'number',
|
|
4010
|
+
description: 'Pagination offset',
|
|
3991
4011
|
},
|
|
3992
4012
|
},
|
|
3993
4013
|
},
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4014
|
+
},
|
|
4015
|
+
{
|
|
4016
|
+
name: 'context_list_channels',
|
|
4017
|
+
description: 'List all channels with metadata (counts, activity, categories)',
|
|
4018
|
+
inputSchema: {
|
|
4019
|
+
type: 'object',
|
|
4020
|
+
properties: {
|
|
4021
|
+
sessionId: {
|
|
4022
|
+
type: 'string',
|
|
4023
|
+
description: 'Filter by specific session (shows accessible items)',
|
|
4024
|
+
},
|
|
4025
|
+
sessionIds: {
|
|
4026
|
+
type: 'array',
|
|
4027
|
+
items: { type: 'string' },
|
|
4028
|
+
description: 'Filter by multiple sessions',
|
|
4029
|
+
},
|
|
4030
|
+
sort: {
|
|
4031
|
+
type: 'string',
|
|
4032
|
+
enum: ['name', 'count', 'activity'],
|
|
4033
|
+
description: 'Sort order for results',
|
|
4034
|
+
default: 'name',
|
|
4035
|
+
},
|
|
4036
|
+
includeEmpty: {
|
|
4037
|
+
type: 'boolean',
|
|
4038
|
+
description: 'Include channels with no items',
|
|
4039
|
+
default: false,
|
|
4020
4040
|
},
|
|
4021
4041
|
},
|
|
4022
4042
|
},
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4043
|
+
},
|
|
4044
|
+
{
|
|
4045
|
+
name: 'context_channel_stats',
|
|
4046
|
+
description: 'Get detailed statistics for a specific channel or all channels',
|
|
4047
|
+
inputSchema: {
|
|
4048
|
+
type: 'object',
|
|
4049
|
+
properties: {
|
|
4050
|
+
channel: {
|
|
4051
|
+
type: 'string',
|
|
4052
|
+
description: 'Specific channel name (omit for all channels overview)',
|
|
4053
|
+
},
|
|
4054
|
+
sessionId: {
|
|
4055
|
+
type: 'string',
|
|
4056
|
+
description: 'Session context for privacy filtering',
|
|
4057
|
+
},
|
|
4058
|
+
includeTimeSeries: {
|
|
4059
|
+
type: 'boolean',
|
|
4060
|
+
description: 'Include hourly/daily activity data',
|
|
4061
|
+
default: false,
|
|
4062
|
+
},
|
|
4063
|
+
includeInsights: {
|
|
4064
|
+
type: 'boolean',
|
|
4065
|
+
description: 'Include AI-generated insights',
|
|
4066
|
+
default: false,
|
|
4047
4067
|
},
|
|
4048
4068
|
},
|
|
4049
4069
|
},
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
description: 'Categories to watch',
|
|
4082
|
-
},
|
|
4083
|
-
channels: {
|
|
4084
|
-
type: 'array',
|
|
4085
|
-
items: { type: 'string' },
|
|
4086
|
-
description: 'Channels to watch',
|
|
4070
|
+
},
|
|
4071
|
+
// Context Watch - Real-time monitoring
|
|
4072
|
+
{
|
|
4073
|
+
name: 'context_watch',
|
|
4074
|
+
description: 'Create and manage watchers for real-time context change monitoring',
|
|
4075
|
+
inputSchema: {
|
|
4076
|
+
type: 'object',
|
|
4077
|
+
properties: {
|
|
4078
|
+
action: {
|
|
4079
|
+
type: 'string',
|
|
4080
|
+
enum: ['create', 'poll', 'stop', 'list'],
|
|
4081
|
+
description: 'Action to perform',
|
|
4082
|
+
},
|
|
4083
|
+
watcherId: {
|
|
4084
|
+
type: 'string',
|
|
4085
|
+
description: 'Watcher ID (required for poll/stop actions)',
|
|
4086
|
+
},
|
|
4087
|
+
filters: {
|
|
4088
|
+
type: 'object',
|
|
4089
|
+
description: 'Filters for watching specific changes (for create action)',
|
|
4090
|
+
properties: {
|
|
4091
|
+
keys: {
|
|
4092
|
+
type: 'array',
|
|
4093
|
+
items: { type: 'string' },
|
|
4094
|
+
description: 'Key patterns to watch (supports wildcards: *, ?)',
|
|
4095
|
+
},
|
|
4096
|
+
categories: {
|
|
4097
|
+
type: 'array',
|
|
4098
|
+
items: {
|
|
4099
|
+
type: 'string',
|
|
4100
|
+
enum: ['task', 'decision', 'progress', 'note', 'error', 'warning'],
|
|
4087
4101
|
},
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4102
|
+
description: 'Categories to watch',
|
|
4103
|
+
},
|
|
4104
|
+
channels: {
|
|
4105
|
+
type: 'array',
|
|
4106
|
+
items: { type: 'string' },
|
|
4107
|
+
description: 'Channels to watch',
|
|
4108
|
+
},
|
|
4109
|
+
priorities: {
|
|
4110
|
+
type: 'array',
|
|
4111
|
+
items: {
|
|
4112
|
+
type: 'string',
|
|
4113
|
+
enum: ['high', 'normal', 'low'],
|
|
4095
4114
|
},
|
|
4115
|
+
description: 'Priority levels to watch',
|
|
4096
4116
|
},
|
|
4097
4117
|
},
|
|
4098
|
-
pollTimeout: {
|
|
4099
|
-
type: 'number',
|
|
4100
|
-
description: 'Polling timeout in seconds (default: 30)',
|
|
4101
|
-
default: 30,
|
|
4102
|
-
},
|
|
4103
4118
|
},
|
|
4104
|
-
|
|
4119
|
+
pollTimeout: {
|
|
4120
|
+
type: 'number',
|
|
4121
|
+
description: 'Polling timeout in seconds (default: 30)',
|
|
4122
|
+
default: 30,
|
|
4123
|
+
},
|
|
4105
4124
|
},
|
|
4125
|
+
required: ['action'],
|
|
4106
4126
|
},
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4127
|
+
},
|
|
4128
|
+
// Context Reassign Channel
|
|
4129
|
+
{
|
|
4130
|
+
name: 'context_reassign_channel',
|
|
4131
|
+
description: 'Move context items between channels based on keys, patterns, or entire channel',
|
|
4132
|
+
inputSchema: {
|
|
4133
|
+
type: 'object',
|
|
4134
|
+
properties: {
|
|
4135
|
+
keys: {
|
|
4136
|
+
type: 'array',
|
|
4137
|
+
items: { type: 'string' },
|
|
4138
|
+
description: 'Specific keys to reassign',
|
|
4139
|
+
},
|
|
4140
|
+
keyPattern: {
|
|
4141
|
+
type: 'string',
|
|
4142
|
+
description: 'Pattern to match keys (supports wildcards: *, ?)',
|
|
4143
|
+
},
|
|
4144
|
+
fromChannel: {
|
|
4145
|
+
type: 'string',
|
|
4146
|
+
description: 'Source channel to move all items from',
|
|
4147
|
+
},
|
|
4148
|
+
toChannel: {
|
|
4149
|
+
type: 'string',
|
|
4150
|
+
description: 'Target channel to move items to',
|
|
4151
|
+
},
|
|
4152
|
+
sessionId: {
|
|
4153
|
+
type: 'string',
|
|
4154
|
+
description: 'Session ID (defaults to current)',
|
|
4155
|
+
},
|
|
4156
|
+
category: {
|
|
4157
|
+
type: 'string',
|
|
4158
|
+
enum: ['task', 'decision', 'progress', 'note', 'error', 'warning'],
|
|
4159
|
+
description: 'Filter by category',
|
|
4160
|
+
},
|
|
4161
|
+
priorities: {
|
|
4162
|
+
type: 'array',
|
|
4163
|
+
items: {
|
|
4136
4164
|
type: 'string',
|
|
4137
|
-
enum: ['
|
|
4138
|
-
description: 'Filter by category',
|
|
4139
|
-
},
|
|
4140
|
-
priorities: {
|
|
4141
|
-
type: 'array',
|
|
4142
|
-
items: {
|
|
4143
|
-
type: 'string',
|
|
4144
|
-
enum: ['high', 'normal', 'low'],
|
|
4145
|
-
},
|
|
4146
|
-
description: 'Filter by priority levels',
|
|
4147
|
-
},
|
|
4148
|
-
dryRun: {
|
|
4149
|
-
type: 'boolean',
|
|
4150
|
-
description: 'Preview changes without applying them',
|
|
4151
|
-
default: false,
|
|
4165
|
+
enum: ['high', 'normal', 'low'],
|
|
4152
4166
|
},
|
|
4167
|
+
description: 'Filter by priority levels',
|
|
4168
|
+
},
|
|
4169
|
+
dryRun: {
|
|
4170
|
+
type: 'boolean',
|
|
4171
|
+
description: 'Preview changes without applying them',
|
|
4172
|
+
default: false,
|
|
4153
4173
|
},
|
|
4154
|
-
required: ['toChannel'],
|
|
4155
4174
|
},
|
|
4175
|
+
required: ['toChannel'],
|
|
4156
4176
|
},
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4177
|
+
},
|
|
4178
|
+
// Batch Operations
|
|
4179
|
+
{
|
|
4180
|
+
name: 'context_batch_save',
|
|
4181
|
+
description: 'Save multiple context items in a single atomic operation',
|
|
4182
|
+
inputSchema: {
|
|
4183
|
+
type: 'object',
|
|
4184
|
+
properties: {
|
|
4185
|
+
items: {
|
|
4186
|
+
type: 'array',
|
|
4187
|
+
description: 'Array of items to save',
|
|
4164
4188
|
items: {
|
|
4165
|
-
type: '
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
type: '
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
channel: {
|
|
4183
|
-
type: 'string',
|
|
4184
|
-
description: 'Channel to organize this item',
|
|
4185
|
-
},
|
|
4189
|
+
type: 'object',
|
|
4190
|
+
properties: {
|
|
4191
|
+
key: { type: 'string', description: 'Unique key for the context item' },
|
|
4192
|
+
value: { type: 'string', description: 'Context value to save' },
|
|
4193
|
+
category: {
|
|
4194
|
+
type: 'string',
|
|
4195
|
+
description: 'Category (e.g., task, decision, progress)',
|
|
4196
|
+
enum: ['task', 'decision', 'progress', 'note', 'error', 'warning'],
|
|
4197
|
+
},
|
|
4198
|
+
priority: {
|
|
4199
|
+
type: 'string',
|
|
4200
|
+
description: 'Priority level',
|
|
4201
|
+
enum: ['high', 'normal', 'low'],
|
|
4202
|
+
},
|
|
4203
|
+
channel: {
|
|
4204
|
+
type: 'string',
|
|
4205
|
+
description: 'Channel to organize this item',
|
|
4186
4206
|
},
|
|
4187
|
-
required: ['key', 'value'],
|
|
4188
4207
|
},
|
|
4189
|
-
|
|
4190
|
-
updateExisting: {
|
|
4191
|
-
type: 'boolean',
|
|
4192
|
-
description: 'Update existing items with same key (default: true)',
|
|
4193
|
-
default: true,
|
|
4208
|
+
required: ['key', 'value'],
|
|
4194
4209
|
},
|
|
4195
4210
|
},
|
|
4196
|
-
|
|
4211
|
+
updateExisting: {
|
|
4212
|
+
type: 'boolean',
|
|
4213
|
+
description: 'Update existing items with same key (default: true)',
|
|
4214
|
+
default: true,
|
|
4215
|
+
},
|
|
4197
4216
|
},
|
|
4217
|
+
required: ['items'],
|
|
4198
4218
|
},
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4219
|
+
},
|
|
4220
|
+
{
|
|
4221
|
+
name: 'context_batch_delete',
|
|
4222
|
+
description: 'Delete multiple context items by keys or pattern in a single atomic operation',
|
|
4223
|
+
inputSchema: {
|
|
4224
|
+
type: 'object',
|
|
4225
|
+
properties: {
|
|
4226
|
+
keys: {
|
|
4227
|
+
type: 'array',
|
|
4228
|
+
items: { type: 'string' },
|
|
4229
|
+
description: 'Array of specific keys to delete',
|
|
4230
|
+
},
|
|
4231
|
+
keyPattern: {
|
|
4232
|
+
type: 'string',
|
|
4233
|
+
description: 'Pattern to match keys for deletion (supports wildcards: *, ?)',
|
|
4234
|
+
},
|
|
4235
|
+
sessionId: {
|
|
4236
|
+
type: 'string',
|
|
4237
|
+
description: 'Session ID (defaults to current)',
|
|
4238
|
+
},
|
|
4239
|
+
dryRun: {
|
|
4240
|
+
type: 'boolean',
|
|
4241
|
+
description: 'Preview items to be deleted without actually deleting',
|
|
4242
|
+
default: false,
|
|
4223
4243
|
},
|
|
4224
4244
|
},
|
|
4225
4245
|
},
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4246
|
+
},
|
|
4247
|
+
{
|
|
4248
|
+
name: 'context_batch_update',
|
|
4249
|
+
description: 'Update multiple context items with partial updates in a single atomic operation',
|
|
4250
|
+
inputSchema: {
|
|
4251
|
+
type: 'object',
|
|
4252
|
+
properties: {
|
|
4253
|
+
updates: {
|
|
4254
|
+
type: 'array',
|
|
4255
|
+
description: 'Array of updates to apply',
|
|
4256
|
+
items: {
|
|
4257
|
+
type: 'object',
|
|
4258
|
+
properties: {
|
|
4259
|
+
key: { type: 'string', description: 'Key of the item to update' },
|
|
4260
|
+
value: { type: 'string', description: 'New value (optional)' },
|
|
4261
|
+
category: {
|
|
4262
|
+
type: 'string',
|
|
4263
|
+
description: 'New category (optional)',
|
|
4264
|
+
enum: ['task', 'decision', 'progress', 'note', 'error', 'warning'],
|
|
4265
|
+
},
|
|
4266
|
+
priority: {
|
|
4267
|
+
type: 'string',
|
|
4268
|
+
description: 'New priority (optional)',
|
|
4269
|
+
enum: ['high', 'normal', 'low'],
|
|
4270
|
+
},
|
|
4271
|
+
channel: {
|
|
4272
|
+
type: 'string',
|
|
4273
|
+
description: 'New channel (optional)',
|
|
4254
4274
|
},
|
|
4255
|
-
required: ['key'],
|
|
4256
4275
|
},
|
|
4257
|
-
|
|
4258
|
-
sessionId: {
|
|
4259
|
-
type: 'string',
|
|
4260
|
-
description: 'Session ID (defaults to current)',
|
|
4276
|
+
required: ['key'],
|
|
4261
4277
|
},
|
|
4262
4278
|
},
|
|
4263
|
-
|
|
4279
|
+
sessionId: {
|
|
4280
|
+
type: 'string',
|
|
4281
|
+
description: 'Session ID (defaults to current)',
|
|
4282
|
+
},
|
|
4264
4283
|
},
|
|
4284
|
+
required: ['updates'],
|
|
4265
4285
|
},
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4286
|
+
},
|
|
4287
|
+
// Context Relationships
|
|
4288
|
+
{
|
|
4289
|
+
name: 'context_link',
|
|
4290
|
+
description: 'Create a relationship between two context items',
|
|
4291
|
+
inputSchema: {
|
|
4292
|
+
type: 'object',
|
|
4293
|
+
properties: {
|
|
4294
|
+
sourceKey: {
|
|
4295
|
+
type: 'string',
|
|
4296
|
+
description: 'Key of the source context item',
|
|
4297
|
+
},
|
|
4298
|
+
targetKey: {
|
|
4299
|
+
type: 'string',
|
|
4300
|
+
description: 'Key of the target context item',
|
|
4301
|
+
},
|
|
4302
|
+
relationship: {
|
|
4303
|
+
type: 'string',
|
|
4304
|
+
description: 'Type of relationship',
|
|
4305
|
+
enum: [
|
|
4306
|
+
'contains',
|
|
4307
|
+
'depends_on',
|
|
4308
|
+
'references',
|
|
4309
|
+
'implements',
|
|
4310
|
+
'extends',
|
|
4311
|
+
'related_to',
|
|
4312
|
+
'blocks',
|
|
4313
|
+
'blocked_by',
|
|
4314
|
+
'parent_of',
|
|
4315
|
+
'child_of',
|
|
4316
|
+
'has_task',
|
|
4317
|
+
'documented_in',
|
|
4318
|
+
'serves',
|
|
4319
|
+
'leads_to',
|
|
4320
|
+
],
|
|
4321
|
+
},
|
|
4322
|
+
metadata: {
|
|
4323
|
+
type: 'object',
|
|
4324
|
+
description: 'Optional metadata for the relationship',
|
|
4305
4325
|
},
|
|
4306
|
-
required: ['sourceKey', 'targetKey', 'relationship'],
|
|
4307
4326
|
},
|
|
4327
|
+
required: ['sourceKey', 'targetKey', 'relationship'],
|
|
4308
4328
|
},
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4329
|
+
},
|
|
4330
|
+
{
|
|
4331
|
+
name: 'context_get_related',
|
|
4332
|
+
description: 'Get items related to a given context item',
|
|
4333
|
+
inputSchema: {
|
|
4334
|
+
type: 'object',
|
|
4335
|
+
properties: {
|
|
4336
|
+
key: {
|
|
4337
|
+
type: 'string',
|
|
4338
|
+
description: 'Key of the context item to find relationships for',
|
|
4339
|
+
},
|
|
4340
|
+
relationship: {
|
|
4341
|
+
type: 'string',
|
|
4342
|
+
description: 'Filter by specific relationship type',
|
|
4343
|
+
},
|
|
4344
|
+
depth: {
|
|
4345
|
+
type: 'number',
|
|
4346
|
+
description: 'Traversal depth for multi-level relationships (default: 1)',
|
|
4347
|
+
default: 1,
|
|
4348
|
+
},
|
|
4349
|
+
direction: {
|
|
4350
|
+
type: 'string',
|
|
4351
|
+
description: 'Direction of relationships to retrieve',
|
|
4352
|
+
enum: ['outgoing', 'incoming', 'both'],
|
|
4353
|
+
default: 'both',
|
|
4334
4354
|
},
|
|
4335
|
-
required: ['key'],
|
|
4336
4355
|
},
|
|
4356
|
+
required: ['key'],
|
|
4337
4357
|
},
|
|
4338
|
-
|
|
4358
|
+
},
|
|
4359
|
+
];
|
|
4360
|
+
return {
|
|
4361
|
+
tools: allTools.filter(tool => enabledTools.has(tool.name)),
|
|
4339
4362
|
};
|
|
4340
4363
|
});
|
|
4341
4364
|
// Start server
|