@@ -12,6 +12,14 @@ import {
1212} from '../tools/data-tools.js' ;
1313import type { MetadataToolContext } from '../tools/metadata-tools.js' ;
1414
15+ // Individual tool metadata imports
16+ import { createObjectTool } from '../tools/create-object.tool.js' ;
17+ import { addFieldTool } from '../tools/add-field.tool.js' ;
18+ import { modifyFieldTool } from '../tools/modify-field.tool.js' ;
19+ import { deleteFieldTool } from '../tools/delete-field.tool.js' ;
20+ import { listMetadataObjectsTool } from '../tools/list-metadata-objects.tool.js' ;
21+ import { describeMetadataObjectTool } from '../tools/describe-metadata-object.tool.js' ;
22+
1523// ── Helpers ────────────────────────────────────────────────────────
1624
1725/** Build a mock IMetadataService with optionally pre-loaded objects. */
@@ -68,6 +76,54 @@ describe('Metadata Tool Definitions', () => {
6876 } ) ;
6977} ) ;
7078
79+ // ═══════════════════════════════════════════════════════════════════
80+ // Individual Tool Metadata Files (.tool.ts)
81+ // ═══════════════════════════════════════════════════════════════════
82+
83+ describe ( 'Individual Tool Metadata (.tool.ts)' , ( ) => {
84+ const tools = [
85+ { tool : createObjectTool , expectedName : 'create_object' , expectedLabel : 'Create Object' } ,
86+ { tool : addFieldTool , expectedName : 'add_field' , expectedLabel : 'Add Field' } ,
87+ { tool : modifyFieldTool , expectedName : 'modify_field' , expectedLabel : 'Modify Field' } ,
88+ { tool : deleteFieldTool , expectedName : 'delete_field' , expectedLabel : 'Delete Field' } ,
89+ { tool : listMetadataObjectsTool , expectedName : 'list_metadata_objects' , expectedLabel : 'List Metadata Objects' } ,
90+ { tool : describeMetadataObjectTool , expectedName : 'describe_metadata_object' , expectedLabel : 'Describe Metadata Object' } ,
91+ ] ;
92+
93+ for ( const { tool, expectedName, expectedLabel } of tools ) {
94+ describe ( expectedName , ( ) => {
95+ it ( 'should have correct name' , ( ) => {
96+ expect ( tool . name ) . toBe ( expectedName ) ;
97+ } ) ;
98+
99+ it ( 'should have a label' , ( ) => {
100+ expect ( tool . label ) . toBe ( expectedLabel ) ;
101+ } ) ;
102+
103+ it ( 'should be categorized as data' , ( ) => {
104+ expect ( tool . category ) . toBe ( 'data' ) ;
105+ } ) ;
106+
107+ it ( 'should be marked as built-in' , ( ) => {
108+ expect ( tool . builtIn ) . toBe ( true ) ;
109+ } ) ;
110+
111+ it ( 'should have a description' , ( ) => {
112+ expect ( tool . description ) . toBeTruthy ( ) ;
113+ } ) ;
114+
115+ it ( 'should have parameters schema' , ( ) => {
116+ expect ( tool . parameters ) . toBeDefined ( ) ;
117+ expect ( tool . parameters . type ) . toBe ( 'object' ) ;
118+ } ) ;
119+
120+ it ( 'should be included in METADATA_TOOL_DEFINITIONS' , ( ) => {
121+ expect ( METADATA_TOOL_DEFINITIONS ) . toContain ( tool ) ;
122+ } ) ;
123+ } ) ;
124+ }
125+ } ) ;
126+
71127// ═══════════════════════════════════════════════════════════════════
72128// registerMetadataTools + Handlers
73129// ═══════════════════════════════════════════════════════════════════
0 commit comments