@@ -69,7 +69,7 @@ export class ComposableMCPServer extends Server {
6969 _toolName : string ,
7070 args : unknown ,
7171 _mode : "input" | "output" ,
72- _originalArgs ?: unknown
72+ _originalArgs ?: unknown ,
7373 ) : unknown {
7474 // For now, just return args unchanged
7575 // TODO: Implement transformResult hooks for runtime transformation
@@ -108,7 +108,7 @@ export class ComposableMCPServer extends Server {
108108 description : string ,
109109 paramsSchema : Schema < T > ,
110110 cb : ( args : T , extra ?: unknown ) => unknown ,
111- options : { internal ?: boolean ; plugins ?: ToolPlugin [ ] } = { }
111+ options : { internal ?: boolean ; plugins ?: ToolPlugin [ ] } = { } ,
112112 ) {
113113 this . toolRegistry . set ( name , {
114114 callback : cb as ToolCallback ,
@@ -158,7 +158,7 @@ export class ComposableMCPServer extends Server {
158158 toolName ,
159159 result ,
160160 "output" ,
161- args
161+ args ,
162162 ) as CallToolResult ;
163163 } ) ;
164164 }
@@ -207,7 +207,7 @@ export class ComposableMCPServer extends Server {
207207 const processedArgs = this . applyPluginTransforms (
208208 resolvedName ,
209209 args ,
210- "input"
210+ "input" ,
211211 ) ;
212212 const result = await callback ( processedArgs ) ;
213213 return this . applyPluginTransforms ( resolvedName , result , "output" , args ) ;
@@ -241,7 +241,7 @@ export class ComposableMCPServer extends Server {
241241 const hiddenSet = new Set ( this . getHiddenToolNames ( ) ) ;
242242
243243 return allRegistered . filter (
244- ( n ) => ! publicSet . has ( n ) && ! internalSet . has ( n ) && ! hiddenSet . has ( n )
244+ ( n ) => ! publicSet . has ( n ) && ! internalSet . has ( n ) && ! hiddenSet . has ( n ) ,
245245 ) ;
246246 }
247247
@@ -258,7 +258,7 @@ export class ComposableMCPServer extends Server {
258258 * Get internal tool schema by name
259259 */
260260 getInternalToolSchema (
261- name : string
261+ name : string ,
262262 ) : { description : string ; schema : JSONSchema } | undefined {
263263 const tool = this . toolRegistry . get ( name ) ;
264264 const config = this . toolConfigs . get ( name ) ;
@@ -371,10 +371,10 @@ export class ComposableMCPServer extends Server {
371371 private async applyTransformToolHooks (
372372 tool : ComposedTool ,
373373 toolName : string ,
374- mode : "agentic" | "agentic_workflow"
374+ mode : "agentic" | "agentic_workflow" ,
375375 ) : Promise < ComposedTool > {
376376 const transformPlugins = this . globalPlugins . filter (
377- ( p ) => p . transformTool && shouldApplyPlugin ( p , mode )
377+ ( p ) => p . transformTool && shouldApplyPlugin ( p , mode ) ,
378378 ) ;
379379
380380 if ( transformPlugins . length === 0 ) {
@@ -411,9 +411,9 @@ export class ComposableMCPServer extends Server {
411411 */
412412 private async processToolsWithPlugins (
413413 externalTools : Record < string , ComposedTool > ,
414- mode : "agentic" | "agentic_workflow"
414+ mode : "agentic" | "agentic_workflow" ,
415415 ) : Promise < void > {
416- for ( const [ toolId , toolData ] of this . toolRegistry . entries ( ) ) {
416+ for ( const [ toolId , toolData ] of this . toolRegistry . entries ( ) ) {
417417 const defaultSchema = {
418418 type : "object" ,
419419 properties : { } ,
@@ -429,7 +429,7 @@ export class ComposableMCPServer extends Server {
429429 const processedTool = await this . applyTransformToolHooks (
430430 tempTool ,
431431 toolId ,
432- mode
432+ mode ,
433433 ) ;
434434
435435 this . toolRegistry . set ( toolId , {
@@ -449,7 +449,7 @@ export class ComposableMCPServer extends Server {
449449 toolId ,
450450 processedTool ,
451451 this ,
452- externalTools
452+ externalTools ,
453453 ) ;
454454 }
455455 } catch {
@@ -465,10 +465,10 @@ export class ComposableMCPServer extends Server {
465465 * Trigger composeEnd hooks for all plugins
466466 */
467467 private async triggerComposeEndHooks (
468- context : ComposeEndContext
468+ context : ComposeEndContext ,
469469 ) : Promise < void > {
470470 const endPlugins = this . globalPlugins . filter (
471- ( p ) => p . composeEnd && shouldApplyPlugin ( p , context . mode )
471+ ( p ) => p . composeEnd && shouldApplyPlugin ( p , context . mode ) ,
472472 ) ;
473473
474474 for ( const plugin of endPlugins ) {
@@ -482,7 +482,7 @@ export class ComposableMCPServer extends Server {
482482 name : string | null ,
483483 description : string ,
484484 depsConfig : z . infer < typeof McpSettingsSchema > = { mcpServers : { } } ,
485- options : ComposeDefinition [ "options" ] = { mode : "agentic" }
485+ options : ComposeDefinition [ "options" ] = { mode : "agentic" } ,
486486 ) {
487487 const refDesc = options . refs ?. join ( "" ) ?? "" ;
488488 const { tagToResults, $ } = parseTags ( description + refDesc , [
@@ -552,7 +552,7 @@ export class ComposableMCPServer extends Server {
552552 tool . attribs . name === toolId
553553 ) ;
554554 } ) ;
555- }
555+ } ,
556556 ) ) as {
557557 tools : Record < string , ComposedTool > ;
558558 cleanupClients : ( ) => Promise < void > ;
@@ -567,8 +567,8 @@ export class ComposableMCPServer extends Server {
567567 } ) ;
568568 } ) ;
569569
570- // Trigger transformation hooks for all tools
571- await this . processToolsWithPlugins ( tools , options . mode ?? "agentic" ) ;
570+ // Trigger transformation hooks for all tools
571+ await this . processToolsWithPlugins ( tools , options . mode ?? "agentic" ) ;
572572
573573 // Cleanup clients when server is closed (pretty-printed to match logging plugin)
574574 this . onclose = async ( ) => {
@@ -604,7 +604,7 @@ export class ComposableMCPServer extends Server {
604604 toolId ,
605605 tool . description || "No description available" ,
606606 jsonSchema ( tool . inputSchema as any ) ,
607- tool . execute
607+ tool . execute ,
608608 ) ;
609609 } ) ;
610610
@@ -639,9 +639,11 @@ export class ComposableMCPServer extends Server {
639639 }
640640 if ( ! tool ) {
641641 throw new Error (
642- `Action ${ toolName } not found, available action list: ${ allToolNames . join (
643- ", "
644- ) } `
642+ `Action ${ toolName } not found, available action list: ${
643+ allToolNames . join (
644+ ", " ,
645+ )
646+ } `,
645647 ) ;
646648 }
647649
0 commit comments