logicstamp_read_bundle
Reads bundle files to extract component contracts and dependency graphs. Use for project overview or detailed component analysis from context files.
Instructions
⚠️ CRITICAL: Do NOT use sleep() delays before calling this tool. When watch mode is active, bundles are already fresh - call this tool directly without any waiting. Reads bundle/index file to get component contracts and dependency graphs. Reads context_main.json (project overview) or folder context.json (component contracts). These are pre-parsed summaries optimized for AI - PREFER over raw .ts/.tsx files. ROOT vs DEPENDENCY: Root components have their own bundles (use rootComponent param). Dependencies appear in bundle.graph.nodes[] of the root that imports them. If a component isn't found as root, it's a dependency - read bundles that might import it and check bundle.graph.nodes[] for the dependency contract. Bundle contains: entryId, graph.nodes[] (UIFContract for root + dependencies), graph.edges[] (dependencies), meta.missing[] (unresolved). UIFContract: kind, description, props, emits, state, exports, semanticHash, optional style metadata. Watch mode: Use projectPath directly (no snapshotId needed). Use bundlePath="context_main.json" for overview, or folder paths from list_bundles for details. The tool handles race conditions internally with retry logic (200-500ms delays + exponential backoff built-in). No external sleep() delays needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| snapshotId | No | Snapshot ID from logicstamp_refresh_snapshot. Optional if watch mode is active - use projectPath instead for direct access. | |
| projectPath | No | Absolute path to project root. Use this instead of snapshotId when watch mode is active for instant access to fresh context. | |
| bundlePath | Yes | Relative path to context.json file or context_main.json from project root. Use "context_main.json" for project overview, or folder paths like "src/components/context.json" for component bundles. | |
| rootComponent | No | Specific ROOT component name to filter within the bundle file (optional). Only works for root components (listed in list_bundles). If omitted, returns the first bundle. Note: Dependencies appear in bundle.graph.nodes[] of the root that imports them, not as separate root bundles. |