Check if watch mode (
stamp context --watch) is active for a project.
logicstamp_watch_status checks whether watch mode is currently running for a project. Watch mode automatically regenerates context bundles when files change, keeping context fresh without manual regeneration.
This command is useful before calling logicstamp_refresh_snapshot to determine whether you should use skipIfWatchActive: true to avoid redundant regeneration.
- Before calling
refresh_snapshot- Check if context is already being kept fresh by watch mode - Optimizing MCP workflows - Skip expensive regeneration when watch mode is active
- Monitoring watch mode - Verify watch mode is running correctly
- Debugging - Check watch mode status and see recent change logs
- Type:
string - Description: CRITICAL: Absolute path to project root. REQUIRED - must always be provided. The server will resolve relative paths to absolute paths automatically.
- Type:
boolean - Default:
false - Description: Include recent watch log entries in the response. When
true, reads from.logicstamp/context_watch-mode-logs.json(only available if watch mode was started with--log-fileflag).
- Type:
number - Default:
5 - Description: Maximum number of recent log entries to return. Only used when
includeRecentLogsistrue.
Returns a WatchStatusOutput object with:
- Type:
string - Description: Absolute path to the project root
- Type:
boolean - Description: Whether watch mode is currently active for this project
- Type:
WatchStatus | null - Description: Watch mode status object (only present when
watchModeActiveistrue), containing:active- Alwaystruewhen presentprojectRoot- Absolute path to project rootpid- Process ID of the watch mode processstartedAt- ISO timestamp when watch mode startedoutputDir- Directory where context files are written
- Type:
WatchLogEntry[] | null - Description: Array of recent regeneration log entries (only present when
includeRecentLogsistrueand logs are available). Each entry contains:timestamp- ISO timestamp of the regenerationchangedFiles- Array of file paths that changedfileCount- Number of files that changeddurationMs- Time taken to regenerate (milliseconds)summary- Summary of changes:modifiedContractsCount- Number of contracts modifiedmodifiedBundlesCount- Number of bundles modifiedaddedContractsCount- Number of contracts addedremovedContractsCount- Number of contracts removed
modifiedContracts- Array of modified contract details (if available)modifiedBundles- Array of modified bundle details (if available)
- Type:
string - Description: Human-readable message describing the watch mode status
{
"name": "logicstamp_watch_status",
"arguments": {
"projectPath": "/absolute/path/to/project"
}
}{
"name": "logicstamp_watch_status",
"arguments": {
"projectPath": "/absolute/path/to/project",
"includeRecentLogs": true,
"logLimit": 10
}
}{
"projectPath": "/path/to/project",
"watchModeActive": true,
"status": {
"active": true,
"projectRoot": "/path/to/project",
"pid": 12345,
"startedAt": "2025-01-20T10:30:00.000Z",
"outputDir": "/path/to/project"
},
"recentLogs": null,
"message": "Watch mode is ACTIVE. Context bundles are being kept fresh automatically..."
}{
"projectPath": "/path/to/project",
"watchModeActive": true,
"status": {
"active": true,
"projectRoot": "/path/to/project",
"pid": 12345,
"startedAt": "2025-01-20T10:30:00.000Z",
"outputDir": "/path/to/project"
},
"recentLogs": [
{
"timestamp": "2025-01-20T10:35:00.000Z",
"changedFiles": ["src/components/Button.tsx"],
"fileCount": 1,
"durationMs": 150,
"summary": {
"modifiedContractsCount": 1,
"modifiedBundlesCount": 1,
"addedContractsCount": 0,
"removedContractsCount": 0
}
},
{
"timestamp": "2025-01-20T10:34:00.000Z",
"changedFiles": ["src/components/Card.tsx", "src/components/Modal.tsx"],
"fileCount": 2,
"durationMs": 280,
"summary": {
"modifiedContractsCount": 2,
"modifiedBundlesCount": 2,
"addedContractsCount": 0,
"removedContractsCount": 0
}
}
],
"message": "Watch mode is ACTIVE. Context bundles are being kept fresh automatically..."
}{
"projectPath": "/path/to/project",
"watchModeActive": false,
"status": null,
"recentLogs": null,
"message": "Watch mode is NOT active. Use 'stamp context --watch' to start watch mode, or call 'refresh_snapshot' to regenerate context."
}-
Check watch status before calling
refresh_snapshot:{ "projectPath": "/path/to/project" } -
If watch mode is active, use
skipIfWatchActive: true:{ "projectPath": "/path/to/project", "skipIfWatchActive": true } -
If watch mode is NOT active, perform normal regeneration:
{ "projectPath": "/path/to/project" }
- Faster execution - Skip expensive regeneration when context is already fresh
- Efficient - Watch mode only rebuilds affected bundles, not entire project
- Smart fallback - Still regenerates if watch mode isn't running
- Reads watch status file - Checks
.logicstamp/context_watch-status.json - Verifies process - Confirms the watch mode process (PID) is still running
- Optionally reads logs - If
includeRecentLogsistrueand--log-filewas used, reads from.logicstamp/context_watch-mode-logs.json
Watch mode writes a status file when it starts (.logicstamp/context_watch-status.json):
{
"active": true,
"projectRoot": "/path/to/project",
"pid": 12345,
"startedAt": "2025-01-20T10:30:00.000Z",
"outputDir": "/path/to/project"
}This file is automatically deleted when watch mode stops.
Watch logs are only available if watch mode was started with the --log-file flag:
stamp context --watch --log-fileLogs are written to .logicstamp/context_watch-mode-logs.json and contain structured change information for each regeneration.
If the command fails, it will throw an error with a descriptive message. Common scenarios:
- Project path not found - The specified
projectPathdoesn't exist - Status file read error - Unable to read watch status file (may indicate watch mode was never started)
- Log file read error - Unable to read watch logs (only if
includeRecentLogsistrueand logs don't exist)
// Step 1: Check watch status
{ "projectPath": "/path/to/project" }
// Step 2: Use skipIfWatchActive based on result
{
"projectPath": "/path/to/project",
"skipIfWatchActive": true // if watchModeActive was true
}{
"projectPath": "/path/to/project",
"includeRecentLogs": true,
"logLimit": 20
}This shows what files changed recently and how long regenerations took.
{
"projectPath": "/path/to/project",
"includeRecentLogs": true
}Check if watch mode is running and see recent activity to verify it's working correctly.
logicstamp_refresh_snapshot- Regenerate context (useskipIfWatchActive: truewhen watch mode is active)logicstamp_list_bundles- List available bundleslogicstamp_read_bundle- Read detailed bundle information
- MCP Integration Guide - Complete MCP server documentation
- Watch Mode CLI Documentation - Complete watch mode documentation
- Quick Start - Getting started guide