"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toolHandler = exports.toolDefinition = void 0; exports.toolDefinition = { name: 'update_thread', description: 'Update the metadata (title, description, tags) of a thread.', inputSchema: { type: 'object', properties: { threadId: { type: 'string', description: 'ID of the thread to update' }, title: { type: 'string', description: 'New title' }, description: { type: 'string', description: 'New description' }, tags: { type: 'array', items: { type: 'string' }, description: 'New list of tags (replaces existing tags)' } }, required: ['threadId'] } }; const toolHandler = async (invocation, threadManager) => { const input = invocation.input; // Separate threadId for the first argument, but pass the full input as the second argument // because UpdateThreadInput requires threadId. return await threadManager.updateThread(input.threadId, input); }; exports.toolHandler = toolHandler;