Step 7 — The create_entry tool definition
Add after the storage helpers:
const CREATE_ENTRY_TOOL = {
name: 'create_entry',
description:
'Creates a new journal entry in the StackLog store. ' +
'Call this when the user wants to save a note, insight, research ' +
'finding, or any log item. Returns the new entry ID on success.',
inputSchema: {
type: 'object',
properties: {
title: {
type: 'string',
description: 'Short headline for the entry. Maximum 80 characters.',
},
content: {
type: 'string',
description: 'Full body text for the entry. Markdown is supported.',
},
tags: {
type: 'array',
items: { type: 'string' },
description:
'Optional list of lowercase topic tags. ' +
'Example: ["react", "lab2", "mcp"]',
},
},
required: ['title', 'content'],
},
} as const;