@@ -402,6 +402,8 @@ Full docs: ${docsUrl}`
402402${ chalk . bold ( 'Server formats:' ) }
403403 mcp.apify.com Remote HTTP server (https:// added automatically)
404404 ~/.vscode/mcp.json:puppeteer Config file entry (file:entry)
405+
406+ ${ chalk . bold ( 'JSON output (--json):' ) } \n MCP InitializeResult: { protocolVersion, capabilities, serverInfo, instructions?, tools? }
405407`
406408 )
407409 . action ( async ( server , sessionName , opts , command ) => {
@@ -460,6 +462,10 @@ ${chalk.bold('Server formats:')}
460462 . command ( 'close [@session]' )
461463 . usage ( '<@session>' )
462464 . description ( 'Close a session' )
465+ . addHelpText (
466+ 'after' ,
467+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { sessionName, closed: true }\n`
468+ )
463469 . action ( async ( sessionName , _opts , command ) => {
464470 if ( ! sessionName ) {
465471 throw new ClientError ( 'Missing required argument: @session\n\nExample: mcpc close @myapp' ) ;
@@ -508,6 +514,10 @@ ${chalk.bold('Server formats:')}
508514 '--client-secret <secret>' ,
509515 'OAuth client secret (for servers without dynamic client registration)'
510516 )
517+ . addHelpText (
518+ 'after' ,
519+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { profile, serverUrl, scopes }\n`
520+ )
511521 . action ( async ( server , opts , command ) => {
512522 if ( ! server ) {
513523 throw new ClientError (
@@ -529,6 +539,10 @@ ${chalk.bold('Server formats:')}
529539 . usage ( '<server>' )
530540 . description ( 'Delete an OAuth profile for a server' )
531541 . option ( '--profile <name>' , 'Profile name (default: "default")' )
542+ . addHelpText (
543+ 'after' ,
544+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { profile, serverUrl, deleted: true, affectedSessions }\n`
545+ )
532546 . action ( async ( server , opts , command ) => {
533547 if ( ! server ) {
534548 throw new ClientError (
@@ -555,6 +569,9 @@ ${chalk.bold('Resources:')}
555569 all Remove all of the above
556570
557571Without arguments, performs safe cleanup of stale data only.
572+
573+ ${ chalk . bold ( 'JSON output (--json):' ) }
574+ { crashedBridges, expiredSessions, orphanedBridgeLogs, sessions, profiles, logs }
558575`
559576 )
560577 . action ( async ( resources : string [ ] , _opts , command ) => {
@@ -606,6 +623,9 @@ ${chalk.bold('Examples:')}
606623 mcpc @apify grep "actor" Search within a single session
607624 mcpc grep "file" --json JSON output for scripting
608625 mcpc grep "actor" -m 5 Show at most 5 results
626+
627+ ${ chalk . bold ( 'JSON output (--json):' ) }
628+ [{ sessionName, tools?: Tool[], resources?: Resource[], prompts?: Prompt[], instructions?: string[] }]
609629`
610630 )
611631 . action ( async ( pattern , opts , command ) => {
@@ -703,6 +723,10 @@ function registerSessionCommands(program: Command, session: string): void {
703723 program
704724 . command ( 'help' )
705725 . description ( 'Show server instructions and available capabilities' )
726+ . addHelpText (
727+ 'after' ,
728+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n MCP InitializeResult: { protocolVersion, capabilities, serverInfo, instructions?, tools? }\n`
729+ )
706730 . action ( async ( _options , command ) => {
707731 await sessions . showHelp ( session , getOptionsFromCommand ( command ) ) ;
708732 } ) ;
@@ -736,6 +760,10 @@ function registerSessionCommands(program: Command, session: string): void {
736760 . command ( 'tools' )
737761 . description ( 'List available tools (shorthand for tools-list)' )
738762 . option ( '--full' , 'Show full tool details including complete input schema' )
763+ . addHelpText (
764+ 'after' ,
765+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n Array of MCP Tool objects: [{ name, description?, inputSchema, annotations? }, ...]\n`
766+ )
739767 . action ( async ( _options , command ) => {
740768 await tools . listTools ( session , getOptionsFromCommand ( command ) ) ;
741769 } ) ;
@@ -744,13 +772,21 @@ function registerSessionCommands(program: Command, session: string): void {
744772 . command ( 'tools-list' )
745773 . description ( 'List available tools' )
746774 . option ( '--full' , 'Show full tool details including complete input schema' )
775+ . addHelpText (
776+ 'after' ,
777+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n Array of MCP Tool objects: [{ name, description?, inputSchema, annotations? }, ...]\n`
778+ )
747779 . action ( async ( _options , command ) => {
748780 await tools . listTools ( session , getOptionsFromCommand ( command ) ) ;
749781 } ) ;
750782
751783 program
752784 . command ( 'tools-get <name>' )
753785 . description ( 'Get information about a specific tool' )
786+ . addHelpText (
787+ 'after' ,
788+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n MCP Tool object: { name, description?, inputSchema, annotations? }\n`
789+ )
754790 . action ( async ( name , _options , command ) => {
755791 await tools . getTool ( session , name , getOptionsFromCommand ( command ) ) ;
756792 } ) ;
@@ -760,6 +796,10 @@ function registerSessionCommands(program: Command, session: string): void {
760796 . description ( 'Call a tool with arguments (key:=value pairs or JSON)' )
761797 . option ( '--task' , 'Use task execution (experimental)' )
762798 . option ( '--detach' , 'Start task and return immediately with task ID (implies --task)' )
799+ . addHelpText (
800+ 'after' ,
801+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n MCP CallToolResult: { content: [{ type, text?, ... }], isError?, structuredContent? }\n`
802+ )
763803 . action ( async ( name , args , options , command ) => {
764804 await tools . callTool ( session , name , {
765805 args,
@@ -773,20 +813,32 @@ function registerSessionCommands(program: Command, session: string): void {
773813 program
774814 . command ( 'tasks-list' )
775815 . description ( 'List active tasks' )
816+ . addHelpText (
817+ 'after' ,
818+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { tasks: [{ taskId, status, statusMessage?, createdAt?, lastUpdatedAt? }, ...] }\n`
819+ )
776820 . action ( async ( _options , command ) => {
777821 await tasks . listTasks ( session , getOptionsFromCommand ( command ) ) ;
778822 } ) ;
779823
780824 program
781825 . command ( 'tasks-get <taskId>' )
782826 . description ( 'Get status of a specific task' )
827+ . addHelpText (
828+ 'after' ,
829+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n MCP Task object: { taskId, status, statusMessage?, createdAt?, lastUpdatedAt? }\n`
830+ )
783831 . action ( async ( taskId , _options , command ) => {
784832 await tasks . getTask ( session , taskId , getOptionsFromCommand ( command ) ) ;
785833 } ) ;
786834
787835 program
788836 . command ( 'tasks-cancel <taskId>' )
789837 . description ( 'Cancel a running task' )
838+ . addHelpText (
839+ 'after' ,
840+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n MCP Task object: { taskId, status, statusMessage? }\n`
841+ )
790842 . action ( async ( taskId , _options , command ) => {
791843 await tasks . cancelTask ( session , taskId , getOptionsFromCommand ( command ) ) ;
792844 } ) ;
@@ -795,13 +847,21 @@ function registerSessionCommands(program: Command, session: string): void {
795847 program
796848 . command ( 'resources' )
797849 . description ( 'List available resources (shorthand for resources-list)' )
850+ . addHelpText (
851+ 'after' ,
852+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n Array of MCP Resource objects: [{ uri, name?, description?, mimeType? }, ...]\n`
853+ )
798854 . action ( async ( _options , command ) => {
799855 await resources . listResources ( session , getOptionsFromCommand ( command ) ) ;
800856 } ) ;
801857
802858 program
803859 . command ( 'resources-list' )
804860 . description ( 'List available resources' )
861+ . addHelpText (
862+ 'after' ,
863+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n Array of MCP Resource objects: [{ uri, name?, description?, mimeType? }, ...]\n`
864+ )
805865 . action ( async ( _options , command ) => {
806866 await resources . listResources ( session , getOptionsFromCommand ( command ) ) ;
807867 } ) ;
@@ -811,6 +871,10 @@ function registerSessionCommands(program: Command, session: string): void {
811871 . description ( 'Get a resource by URI' )
812872 . option ( '-o, --output <file>' , 'Write resource to file' )
813873 . option ( '--max-size <bytes>' , 'Maximum resource size in bytes' )
874+ . addHelpText (
875+ 'after' ,
876+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n MCP ReadResourceResult: { contents: [{ uri, mimeType?, text? | blob? }] }\n`
877+ )
814878 . action ( async ( uri , options , command ) => {
815879 await resources . getResource ( session , uri , {
816880 output : options . output ,
@@ -822,20 +886,32 @@ function registerSessionCommands(program: Command, session: string): void {
822886 program
823887 . command ( 'resources-subscribe <uri>' )
824888 . description ( 'Subscribe to resource updates' )
889+ . addHelpText (
890+ 'after' ,
891+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { subscribed: true, uri: string }\n`
892+ )
825893 . action ( async ( uri , _options , command ) => {
826894 await resources . subscribeResource ( session , uri , getOptionsFromCommand ( command ) ) ;
827895 } ) ;
828896
829897 program
830898 . command ( 'resources-unsubscribe <uri>' )
831899 . description ( 'Unsubscribe from resource updates' )
900+ . addHelpText (
901+ 'after' ,
902+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { unsubscribed: true, uri: string }\n`
903+ )
832904 . action ( async ( uri , _options , command ) => {
833905 await resources . unsubscribeResource ( session , uri , getOptionsFromCommand ( command ) ) ;
834906 } ) ;
835907
836908 program
837909 . command ( 'resources-templates-list' )
838910 . description ( 'List available resource templates' )
911+ . addHelpText (
912+ 'after' ,
913+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n Array of MCP ResourceTemplate objects: [{ uriTemplate, name?, description?, mimeType? }, ...]\n`
914+ )
839915 . action ( async ( _options , command ) => {
840916 await resources . listResourceTemplates ( session , getOptionsFromCommand ( command ) ) ;
841917 } ) ;
@@ -844,20 +920,32 @@ function registerSessionCommands(program: Command, session: string): void {
844920 program
845921 . command ( 'prompts' )
846922 . description ( 'List available prompts (shorthand for prompts-list)' )
923+ . addHelpText (
924+ 'after' ,
925+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n Array of MCP Prompt objects: [{ name, description?, arguments?: [{ name, description?, required? }] }, ...]\n`
926+ )
847927 . action ( async ( _options , command ) => {
848928 await prompts . listPrompts ( session , getOptionsFromCommand ( command ) ) ;
849929 } ) ;
850930
851931 program
852932 . command ( 'prompts-list' )
853933 . description ( 'List available prompts' )
934+ . addHelpText (
935+ 'after' ,
936+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n Array of MCP Prompt objects: [{ name, description?, arguments?: [{ name, description?, required? }] }, ...]\n`
937+ )
854938 . action ( async ( _options , command ) => {
855939 await prompts . listPrompts ( session , getOptionsFromCommand ( command ) ) ;
856940 } ) ;
857941
858942 program
859943 . command ( 'prompts-get <name> [args...]' )
860944 . description ( 'Get a prompt by name with arguments (key:=value pairs or JSON)' )
945+ . addHelpText (
946+ 'after' ,
947+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n MCP GetPromptResult: { description?, messages: [{ role, content: { type, text?, ... } }] }\n`
948+ )
861949 . action ( async ( name , args , _options , command ) => {
862950 await prompts . getPrompt ( session , name , {
863951 args,
@@ -871,6 +959,7 @@ function registerSessionCommands(program: Command, session: string): void {
871959 . description (
872960 'Set server logging level (debug, info, notice, warning, error, critical, alert, emergency)'
873961 )
962+ . addHelpText ( 'after' , `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { level: string }\n` )
874963 . action ( async ( level , _options , command ) => {
875964 await logging . setLogLevel ( session , level , getOptionsFromCommand ( command ) ) ;
876965 } ) ;
@@ -879,6 +968,10 @@ function registerSessionCommands(program: Command, session: string): void {
879968 program
880969 . command ( 'ping' )
881970 . description ( 'Ping the MCP server to check if it is alive' )
971+ . addHelpText (
972+ 'after' ,
973+ `\n${ chalk . bold ( 'JSON output (--json):' ) } \n { success: true, durationMs: number }\n`
974+ )
882975 . action ( async ( _options , command ) => {
883976 await utilities . ping ( session , getOptionsFromCommand ( command ) ) ;
884977 } ) ;
0 commit comments