Skip to content

refactor: index.js imports from shared tools.js - #11

Merged
thomhoffer-arch merged 11 commits into
mainfrom
claude/review-claude-bridge-BPfhX
Apr 13, 2026
Merged

refactor: index.js imports from shared tools.js#11
thomhoffer-arch merged 11 commits into
mainfrom
claude/review-claude-bridge-BPfhX

Conversation

@thomhoffer-arch

Copy link
Copy Markdown
Collaborator

No description provided.

claude added 11 commits April 13, 2026 05:49
…ild script

- @modelcontextprotocol/sdk ^1.12.1 → ^1.29.0 (registerTool API, annotations)
- zod ^3.23.0 → ^3.25.0 (SDK peer dep requirement)
- Add build:mcp script for esbuild bundling (.mcpb packaging)
- Keep existing pkg bundle script unchanged

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
- manifest.json (v0.4 schema) for one-click Claude Desktop install
- .mcpbignore to exclude source files from the bundle
- Extension uses Claude Desktop's built-in Node.js runtime (server.type: "node")
- Entry point is esbuild-bundled dist/mcp-bundle.cjs

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
… and prompts

smart-bridge.js changes:
- Enrich all 24 TOOLS with mcpDesc (rich BIM-domain descriptions for Claude)
  and per-param md (detailed parameter descriptions). REST uses existing
  terse desc/d fields — fully backward compatible.
- Add safety annotations to every tool (readOnlyHint, destructiveHint,
  idempotentHint, openWorldHint) so Claude Desktop can auto-approve reads.
- Add MCP server instructions explaining BIM context and typical workflow.
- Migrate mcp.tool() → mcp.registerTool() (deprecated API in SDK v1.29+).
- Add 2 MCP Resources: clashcontrol://status and clashcontrol://clash-summary.
- Add 4 MCP Prompts: analyze-clash-report, investigate-clash,
  coordination-review, compare-clash-runs.

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
…and prompts

Replace 24 hand-coded server.tool() registrations with the same dynamic
registerTool() pattern used in smart-bridge.js. Adds:
- Enriched TOOLS object with mcpDesc, annotations, and md param descriptions
- MCP server instructions for BIM workflow context
- 2 MCP Resources (clashcontrol://status, clashcontrol://clash-summary)
- 4 MCP Prompts (analyze-clash-report, investigate-clash,
  coordination-review, compare-clash-runs)
- Version read from package.json instead of hardcoded

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
…GPT integration

Improve all 24 tool descriptions and parameter descriptions with BIM-domain
context. Descriptions now mention IFC elements, discipline pairs, hard vs
soft clashes, BCF compatibility, etc. Backward compatible — same field
structure, just richer text.

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
Single source of truth for all 24 tool definitions with enriched
descriptions, annotations, and parameter metadata. Will be consumed
by smart-bridge.js, index.js, and the esbuild .mcpb bundle.

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
Shared function that registers all 24 tools on an McpServer instance
using registerTool() with enriched descriptions and safety annotations.
Both smart-bridge.js and index.js will use this instead of inline loops.

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
- 2 Resources: clashcontrol://status, clashcontrol://clash-summary
- 4 Prompts: analyze-clash-report, investigate-clash,
  coordination-review, compare-clash-runs
- Complete shared module now exports: TOOLS, MCP_INSTRUCTIONS,
  registerMcpTools, registerMcpResources, registerMcpPrompts

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
Replace inline TOOLS object (~175 lines) and inline MCP registration
(~130 lines) with require('./tools.js'). startMcpServer() now calls
registerMcpTools, registerMcpResources, registerMcpPrompts from the
shared module. REST API continues working via the imported TOOLS object.

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
Replace inline TOOLS object and 24 individual tool registrations with
shared tools.js module. File goes from ~300 lines to ~95 lines.
Same MCP capabilities: 24 tools, 2 resources, 4 prompts, instructions.

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
Main bumped to 0.1.6 via auto-patch; our branch uses 0.2.0 since
this is a feature release (resources, prompts, annotations, .mcpb).

https://claude.ai/code/session_01XEvUykWcLc452uxGWPb1mb
@thomhoffer-arch
thomhoffer-arch merged commit 29d5dd0 into main Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants