-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
ADR-001: Unified Tool Contract Object Model
Status
Proposed
Context
The consolidated runtime currently keeps key contract elements in separate places:
- Tool metadata maps in
src/server/consolidated-registry.ts - Action enums and schemas in
src/server/consolidated/*.ts - Handler bindings in consolidated tool modules
This separation creates drift risk between discovery metadata, runtime behavior, and documentation.
Decision
Adopt a single declarative contract object per consolidated tool that contains:
- Tool metadata (name/category/keywords/capabilities/description)
- Action definitions (action literals + schemas)
- Handler bindings
Generate registry/search metadata from these contract objects, replacing manually maintained parallel maps where possible.
Consequences
Positive
- Stronger consistency across registration, schema loading, and discovery
- Lower maintenance overhead for adding/modifying tools
- Easier automated documentation and parity checks
Trade-offs
- Initial migration cost for all consolidated tools
- Requires generator/adapter layer for current runtime registration path
Acceptance Criteria
- Each consolidated tool exports one contract definition
- Registry metadata is derived from contract definitions
-
search_toolsandload_tool_schemabehavior remains compatible - Tests verify metadata/action/schema parity for all consolidated tools
Source
Architecture analysis: docs/ARCHITECTURE-CODEBASE-ANALYSIS.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels