Skip to content

Commit 272f6f9

Browse files
authored
Release/0.1.1 (#13)
* chore: update documentation and version for required projectPath parameter - Updated CHANGELOG.md to document the release of version 0.1.1. - Corrected `projectPath` parameter in documentation to mark it as required for `logicstamp_refresh_snapshot`, including explanations and examples. - Updated package.json and package-lock.json to reflect the new version 0.1.1. - Enhanced error handling in tests to ensure proper validation of the required `projectPath` parameter. * docs: clarify projectPath requirement and streamline parameter descriptions in README.md
1 parent b78ab8c commit 272f6f9

File tree

9 files changed

+44
-13
lines changed

9 files changed

+44
-13
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.1] - 2025-12-14
9+
10+
### Fixed
11+
12+
- **Documentation Fix** - Corrected `projectPath` parameter documentation for `logicstamp_refresh_snapshot`
13+
- Updated docs to correctly mark `projectPath` as required (was incorrectly marked as optional)
14+
- Added explanation of why `projectPath` is required (prevents hangs when `stamp init` has been run)
15+
- Updated all examples to include `projectPath` parameter
16+
- Fixes issue where users following documentation would encounter errors when omitting `projectPath`
17+
818
## [0.1.0] - 2025-12-13
919

1020
### Added

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
<img src="./assets/logicstamp-fox.svg" alt="LogicStamp Fox Mascot" width="120" height="120">
55
</div>
66

7+
![Version](https://img.shields.io/badge/version-0.1.1-blue.svg)
8+
![Beta](https://img.shields.io/badge/status-beta-orange.svg)
9+
![License](https://img.shields.io/badge/license-MIT-green.svg)
10+
![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)
11+
[![CI](https://github.com/LogicStamp/logicstamp-mcp/workflows/CI/badge.svg)](https://github.com/LogicStamp/logicstamp-mcp/actions)
12+
713
Model Context Protocol (MCP) server for [LogicStamp Context](https://github.com/LogicStamp/logicstamp-context) - enabling AI assistants to safely analyze and understand React/TypeScript codebases.
814

915
## Overview
@@ -86,9 +92,10 @@ The MCP server provides 6 tools. For complete API documentation with input/outpu
8692
### Quick Reference
8793

8894
**logicstamp_refresh_snapshot** - Create a snapshot of the current codebase state (STEP 1)
89-
- Parameters: `profile` (optional), `mode` (optional), `includeStyle` (optional), `projectPath` (optional), `cleanCache` (optional)
95+
- Parameters: `profile` (optional), `mode` (optional), `includeStyle` (optional), `projectPath` (required), `cleanCache` (optional)
9096
- Returns: `snapshotId`, `summary`, `folders`
9197
- **Always call this first** when analyzing a new repo
98+
- **Note:** `projectPath` is REQUIRED - must be an absolute path to the project root. Omitting this parameter can cause the server to hang.
9299
- Cache is automatically cleaned if corruption is detected
93100

94101
**logicstamp_list_bundles** - List available bundles for selective loading (STEP 2)
@@ -105,7 +112,7 @@ The MCP server provides 6 tools. For complete API documentation with input/outpu
105112
- Parameters:
106113
- `profile` (optional): Analysis profile (default: `llm-chat`)
107114
- `mode` (optional): Code inclusion mode (default: `header`)
108-
- `includeStyle` (optional): Include style metadata in comparison. Only takes effect when `forceRegenerate` is `true`. When `forceRegenerate` is `false`, compares whatever style metadata exists on disk (may be incomplete) (default: `false`)
115+
- `includeStyle` (optional): Include style metadata in comparison. Only takes effect when `forceRegenerate` is `true` (default: `false`)
109116
- `forceRegenerate` (optional): Force regeneration of context before comparing. When `false`, reads existing `context_main.json` from disk (fast). When `true`, runs `stamp context` to regenerate (default: `false`)
110117
- `projectPath` (optional): Project path (defaults to current directory)
111118
- `baseline` (optional): Comparison baseline: `disk` (default), `snapshot`, or custom path

docs/commands/refresh-snapshot.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@
5252
- Visual consistency checks
5353
- When the user asks about styling, colors, spacing, animations, or visual design
5454

55-
### `projectPath` (optional)
55+
### `projectPath` (required)
5656
- **Type:** `string`
57-
- **Default:** Current working directory (or `PROJECT_PATH` environment variable)
58-
- **Description:** Absolute path to the project root. If not provided, uses the current directory.
57+
- **Description:** **CRITICAL: Absolute path to project root. REQUIRED - must always be provided.** When `stamp init` has been run, MCP clients may omit this parameter, causing hangs. This parameter is REQUIRED for the tool to work correctly. The server will resolve relative paths to absolute paths automatically.
5958

6059
### `cleanCache` (optional)
6160
- **Type:** `boolean`
@@ -116,18 +115,21 @@ Array of folder metadata objects, each containing:
116115
```json
117116
{
118117
"name": "logicstamp_refresh_snapshot",
119-
"arguments": {}
118+
"arguments": {
119+
"projectPath": "/absolute/path/to/project"
120+
}
120121
}
121122
```
122123

123-
This creates a snapshot with default settings (`profile: 'llm-chat'`, `mode: 'header'`, `includeStyle: false`).
124+
This creates a snapshot with default settings (`profile: 'llm-chat'`, `mode: 'header'`, `includeStyle: false`). **Note:** `projectPath` is required.
124125

125126
### With Custom Profile
126127

127128
```json
128129
{
129130
"name": "logicstamp_refresh_snapshot",
130131
"arguments": {
132+
"projectPath": "/absolute/path/to/project",
131133
"profile": "llm-safe"
132134
}
133135
}
@@ -139,6 +141,7 @@ This creates a snapshot with default settings (`profile: 'llm-chat'`, `mode: 'he
139141
{
140142
"name": "logicstamp_refresh_snapshot",
141143
"arguments": {
144+
"projectPath": "/absolute/path/to/project",
142145
"includeStyle": true
143146
}
144147
}
@@ -150,6 +153,7 @@ This creates a snapshot with default settings (`profile: 'llm-chat'`, `mode: 'he
150153
{
151154
"name": "logicstamp_refresh_snapshot",
152155
"arguments": {
156+
"projectPath": "/absolute/path/to/project",
153157
"mode": "full"
154158
}
155159
}

docs/mcp_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ logicstamp-context/
7373
- `profile` (optional): `llm-chat` (default) | `llm-safe` | `ci-strict`
7474
- `mode` (optional): `header` (default) | `full` | `none`
7575
- `includeStyle` (optional): Include style metadata (default: `false`)
76-
- `projectPath` (optional): Defaults to current working directory
76+
- `projectPath` (required): **CRITICAL: Absolute path to project root. REQUIRED - must always be provided.** When `stamp init` has been run, MCP clients may omit this parameter, causing hangs. This parameter is REQUIRED for the tool to work correctly. The server will resolve relative paths to absolute paths automatically.
7777
- `cleanCache` (optional): Force cache cleanup (default: `false`, auto-detects corruption)
7878

7979
**Behavior**:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "logicstamp-mcp",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "MCP server for LogicStamp Context - analyze React/TypeScript codebases",
55
"type": "module",
66
"main": "./dist/index.js",

src/mcp/server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { readBundle } from './tools/read-bundle.js';
1818
import { compareSnapshot } from './tools/compare-snapshot.js';
1919
import { compareModes } from './tools/compare-modes.js';
2020
import { readLogicStampDocs } from './tools/read-logicstamp-docs.js';
21+
import type { RefreshSnapshotInput } from '../types/schemas.js';
2122

2223
/**
2324
* Create and configure the MCP server
@@ -264,7 +265,10 @@ export function createServer(): Server {
264265

265266
switch (name) {
266267
case 'logicstamp_refresh_snapshot': {
267-
const result = await refreshSnapshot(args || {});
268+
// Type assertion is safe here because:
269+
// 1. MCP framework validates JSON schema (which requires projectPath)
270+
// 2. refreshSnapshot function validates projectPath at runtime and throws clear error if missing
271+
const result = await refreshSnapshot((args || {}) as unknown as RefreshSnapshotInput);
268272
return {
269273
content: [
270274
{

src/types/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export interface RefreshSnapshotInput {
8282
profile?: 'llm-chat' | 'llm-safe' | 'ci-strict';
8383
mode?: 'header' | 'full' | 'none';
8484
includeStyle?: boolean; // Include style metadata (equivalent to stamp context style)
85-
projectPath?: string;
85+
projectPath: string; // REQUIRED: Absolute path to project root
8686
cleanCache?: boolean; // Manually force cache cleanup (default: false, auto-detects corruption)
8787
}
8888

tests/integration/refresh-snapshot.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ describe('refreshSnapshot integration tests', () => {
188188
});
189189

190190
describe('error handling', () => {
191+
it('should throw error when projectPath is missing', async () => {
192+
await expect(
193+
refreshSnapshot({} as any)
194+
).rejects.toThrow('projectPath is REQUIRED');
195+
});
196+
191197
it('should throw error when stamp command fails', async () => {
192198
mockExecImpl.mockImplementation((command: string, options: any, callback: any) => {
193199
if (callback) {

0 commit comments

Comments
 (0)