What problem does it solve?
Authoring a new tdmcp MCP tool is complex and boilerplate-heavy. This Skill provides a canonical, end-to-end blueprint to implement a tool using the standard file shape (XImpl + registerX), the Python-bridge pattern (buildPayloadScript/parsePythonReport), and the offline unit-test scaffolding, ensuring consistency with the project’s architecture and testing practices.
Core Features & Use Cases
- Canonical template: Implement a tdmcp tool using the standard file shape (XImpl + registerX) and the recommended template
src/tools/layer2/manageComponent.ts.
- Bridge pattern & safety: Use the bridge approach (buildPayloadScript + parsePythonReport) with in-script TD globals and guard logic to avoid runtime crashes.
- Testing strategy: Provide a unit-test scaffold under
tests/unit that runs offline with msw to validate happy paths, fatal conditions, and bad input.
- Style & conventions: Adhere to Biome/ESM style, NodeNext imports, and clear annotations to ensure predictable tooling behavior.
Quick Start
Follow the canonical template in src/tools/layer*/ to create a new tool: implement xSchema, xImpl, and registerX, then add unit tests under tests/unit to validate the bridge workflow.