append_insight
Record business insights from analysis into a memo resource for easy reference.
Instructions
Add a business insight to the insights memo resource. Useful for recording observations from analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| insight | Yes | The business insight to record |
Implementation Reference
- src/index.ts:262-272 (registration)Tool registration for 'append_insight' in the ListToolsRequestSchema handler. Defines the tool name, description ('Add a business insight to the insights memo resource'), and input schema (requires a single 'insight' string property).
{ name: 'append_insight', description: 'Add a business insight to the insights memo resource. Useful for recording observations from analysis.', inputSchema: { type: 'object' as const, properties: { insight: { type: 'string', description: 'The business insight to record' }, }, required: ['insight'], }, }, - src/index.ts:330-334 (handler)Handler implementation for the 'append_insight' tool within the CallToolRequestSchema switch statement. Extracts the 'insight' argument, pushes it onto the shared insights array, and returns a confirmation message with the total count.
case 'append_insight': { const { insight } = toolArgs as { insight: string }; insights.push(insight); return { content: [{ type: 'text', text: `Insight added (total: ${insights.length})` }] }; } - src/index.ts:131-132 (helper)The shared insights store: a module-level string array (insights) that persists insights across tool calls and is also read by the 'memo://insights' resource handler.
// --- Shared insights store --- const insights: string[] = [];