44import 'mocha' ;
55import { expect } from 'chai' ;
66import { converToMcpToolTriggerOptionsToRpc } from '../../src/converters/toMcpToolTriggerOptionsToRpc' ;
7- import { toolProp } from '../../src/utils/toolProperties' ;
7+ import { toolProperty } from '../../src/utils/toolProperties' ;
88import { McpToolProperty , McpToolTriggerOptions , ToolProps } from '../../types/mcpTool' ;
99
1010describe ( 'converToMcpToolTriggerOptionsToRpc' , ( ) => {
@@ -90,8 +90,8 @@ describe('converToMcpToolTriggerOptionsToRpc', () => {
9090 describe ( 'toolProps object format' , ( ) => {
9191 it ( 'should handle toolProps object format' , ( ) => {
9292 const toolProperties : ToolProps = {
93- name : toolProp . string ( ) . desc ( 'The name of the item' ) ,
94- age : toolProp . number ( ) . desc ( 'The age of the person' ) . optional ( ) ,
93+ name : toolProperty . string ( ) . describe ( 'The name of the item' ) ,
94+ age : toolProperty . number ( ) . describe ( 'The age of the person' ) . optional ( ) ,
9595 } ;
9696
9797 const input : McpToolTriggerOptions = {
@@ -116,11 +116,11 @@ describe('converToMcpToolTriggerOptionsToRpc', () => {
116116
117117 it ( 'should handle all supported property types' , ( ) => {
118118 const toolProperties : ToolProps = {
119- stringProp : toolProp . string ( ) . desc ( 'A string property' ) ,
120- numberProp : toolProp . number ( ) . desc ( 'A number property' ) . optional ( ) ,
121- booleanProp : toolProp . boolean ( ) . desc ( 'A boolean property' ) ,
122- objectProp : toolProp . object ( ) . desc ( 'An object property' ) . optional ( ) ,
123- longProp : toolProp . long ( ) . desc ( 'A long property' ) ,
119+ stringProp : toolProperty . string ( ) . describe ( 'A string property' ) ,
120+ numberProp : toolProperty . number ( ) . describe ( 'A number property' ) . optional ( ) ,
121+ booleanProp : toolProperty . boolean ( ) . describe ( 'A boolean property' ) ,
122+ objectProp : toolProperty . object ( ) . describe ( 'An object property' ) . optional ( ) ,
123+ doubleProp : toolProperty . double ( ) . describe ( 'A double property' ) ,
124124 } ;
125125
126126 const input : McpToolTriggerOptions = {
@@ -140,8 +140,8 @@ describe('converToMcpToolTriggerOptionsToRpc', () => {
140140
141141 it ( 'should handle array properties correctly' , ( ) => {
142142 const toolProperties : ToolProps = {
143- stringArray : toolProp . string ( ) . desc ( 'A string array' ) . asArray ( ) . optional ( ) ,
144- numberArray : toolProp . number ( ) . desc ( 'A number array' ) . asArray ( ) ,
143+ stringArray : toolProperty . string ( ) . describe ( 'A string array' ) . asArray ( ) . optional ( ) ,
144+ numberArray : toolProperty . number ( ) . describe ( 'A number array' ) . asArray ( ) ,
145145 } ;
146146
147147 const input : McpToolTriggerOptions = {
@@ -312,7 +312,7 @@ describe('converToMcpToolTriggerOptionsToRpc', () => {
312312 describe ( 'JSON serialization' , ( ) => {
313313 it ( 'should produce valid JSON in toolProperties' , ( ) => {
314314 const toolProperties : ToolProps = {
315- test : toolProp . string ( ) . desc ( 'Test property' ) ,
315+ test : toolProperty . string ( ) . describe ( 'Test property' ) ,
316316 } ;
317317
318318 const input : McpToolTriggerOptions = {
@@ -352,7 +352,9 @@ describe('converToMcpToolTriggerOptionsToRpc', () => {
352352 describe ( 'edge cases' , ( ) => {
353353 it ( 'should handle properties with special characters' , ( ) => {
354354 const toolProperties : ToolProps = {
355- 'special-field_with$symbols' : toolProp . string ( ) . desc ( 'A property with special characters in name' ) ,
355+ 'special-field_with$symbols' : toolProperty
356+ . string ( )
357+ . describe ( 'A property with special characters in name' ) ,
356358 } ;
357359
358360 const input : McpToolTriggerOptions = {
@@ -372,7 +374,7 @@ describe('converToMcpToolTriggerOptionsToRpc', () => {
372374
373375 it ( 'should handle properties with non-empty descriptions' , ( ) => {
374376 const toolProperties : ToolProps = {
375- validDesc : toolProp . string ( ) . desc ( 'A valid description' ) ,
377+ validDesc : toolProperty . string ( ) . describe ( 'A valid description' ) ,
376378 } ;
377379
378380 const input : McpToolTriggerOptions = {
@@ -391,7 +393,7 @@ describe('converToMcpToolTriggerOptionsToRpc', () => {
391393 } ) ;
392394 it ( 'should handle whitespace in names and descriptions' , ( ) => {
393395 const toolProperties : ToolProps = {
394- ' spaced name ' : toolProp . string ( ) . desc ( ' spaced description ' ) . optional ( ) ,
396+ ' spaced name ' : toolProperty . string ( ) . describe ( ' spaced description ' ) . optional ( ) ,
395397 } ;
396398
397399 const input : McpToolTriggerOptions = {
0 commit comments