From 2d83c03360727d5f8c55167636a8649eb54ab9cf Mon Sep 17 00:00:00 2001 From: Jan Curn Date: Mon, 23 Mar 2026 22:37:37 +0100 Subject: [PATCH 1/3] Better copy and help --- .gitignore | 1 + src/cli/commands/sessions.ts | 2 +- src/cli/index.ts | 4 ++-- src/cli/output.ts | 40 ++++++++++++++++++------------------ 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index eaa2055b..74bdba01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # IDE .idea .vscode +.claude # Dependencies node_modules/ diff --git a/src/cli/commands/sessions.ts b/src/cli/commands/sessions.ts index 0a82af41..781939b6 100644 --- a/src/cli/commands/sessions.ts +++ b/src/cli/commands/sessions.ts @@ -457,7 +457,7 @@ export async function listSessionsAndAuthProfiles(options: { console.log(chalk.bold('No OAuth profiles.')); console.log(chalk.dim(' ↳ run: mcpc login mcp.example.com')); } else { - console.log(chalk.bold('Available OAuth profiles:')); + console.log(chalk.bold('Saved OAuth profiles:')); for (const profile of profiles) { const hostStr = getServerHost(profile.serverUrl); const nameStr = chalk.magenta(profile.name); diff --git a/src/cli/index.ts b/src/cli/index.ts index e0d62f89..8091ec23 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -343,8 +343,8 @@ function createTopLevelProgram(): Command { ` ${chalk.bold('MCP session commands (after connecting):')} <@session> Show MCP server info and capabilities - <@session> ${chalk.cyan('tools-list')} List MCP tools - <@session> ${chalk.cyan('tools-get')} + <@session> ${chalk.cyan('tools-list')} List MCP server tools + <@session> ${chalk.cyan('tools-get')} Get tool details and schema <@session> ${chalk.cyan('tools-call')} [arg:=val ... | | ${chalk.cyan('prompts-list')} <@session> ${chalk.cyan('prompts-get')} [arg:=val ... | | \`` + `For full tool details and schema, run \`mcpc ${session}tools-list --full\` or \`mcpc ${session}tools-get \`` ); return lines.join('\n'); @@ -570,7 +570,7 @@ export function formatResources(resources: Resource[]): string { const lines: string[] = []; // Header with resource count - lines.push(chalk.bold(`Available resources (${resources.length}):`)); + lines.push(chalk.bold(`Resources (${resources.length}):`)); // Summary list of resources const bullet = chalk.dim('*'); @@ -627,7 +627,7 @@ export function formatResourceTemplates(templates: ResourceTemplate[]): string { const lines: string[] = []; // Header with template count - lines.push(chalk.bold(`Available resource templates (${templates.length}):`)); + lines.push(chalk.bold(`Resource templates (${templates.length}):`)); // Summary list of templates const bullet = chalk.dim('*'); @@ -684,7 +684,7 @@ export function formatPrompts(prompts: Prompt[]): string { const lines: string[] = []; // Header with prompt count - lines.push(chalk.bold(`Available prompts (${prompts.length}):`)); + lines.push(chalk.bold(`Prompts (${prompts.length}):`)); // Summary list of prompts const bullet = chalk.dim('*'); @@ -1145,6 +1145,21 @@ export function formatServerDetails( } lines.push(''); + // Tools list (from bridge cache, no extra server call) + if (tools && tools.length > 0) { + lines.push(formatToolsCompact(tools, { sessionName: target })); + lines.push(''); + } + + // Instructions in code block + const trimmed = instructions ? instructions.trim() : ''; + if (trimmed) { + lines.push(chalk.bold('Instructions:')); + lines.push(chalk.gray('````')); + lines.push(trimmed); + lines.push(chalk.gray('````')); + } + // Commands lines.push(chalk.bold('Available commands:')); const commands: string[] = []; @@ -1184,20 +1199,5 @@ export function formatServerDetails( lines.push(commands.join('\n')); lines.push(''); - // Tools list (from bridge cache, no extra server call) - if (tools && tools.length > 0) { - lines.push(formatToolsCompact(tools, { sessionName: target })); - lines.push(''); - } - - // Instructions in code block - const trimmed = instructions ? instructions.trim() : ''; - if (trimmed) { - lines.push(chalk.bold('Instructions:')); - lines.push(chalk.gray('````')); - lines.push(trimmed); - lines.push(chalk.gray('````')); - } - return lines.join('\n'); } From 6fe6ccaea4b2dd832ca3091cd0e6cbc40434188b Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Mar 2026 21:56:59 +0000 Subject: [PATCH 2/3] Fix unit tests to match updated header text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update output.test.ts assertions to match the PR's renamed headers: "Available tools/resources/prompts/templates" → "Tools/Resources/Prompts/Templates" https://claude.ai/code/session_01Lr6hQ855QQbCKCtyspknw2 --- test/unit/cli/output.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/unit/cli/output.test.ts b/test/unit/cli/output.test.ts index 493c35d6..73bea4d8 100644 --- a/test/unit/cli/output.test.ts +++ b/test/unit/cli/output.test.ts @@ -466,7 +466,7 @@ describe('formatTools', () => { describe('compact format (default)', () => { it('should show header with tool count', () => { const output = formatTools(sampleTools); - expect(output).toContain('Available tools (2):'); + expect(output).toContain('Tools (2):'); }); it('should show tool names in backticks', () => { @@ -570,7 +570,7 @@ describe('formatTools', () => { it('should handle empty tools array', () => { const output = formatTools([]); - expect(output).toContain('Available tools (0):'); + expect(output).toContain('Tools (0):'); }); it('should show task mode for tools with task support', () => { @@ -1008,7 +1008,7 @@ describe('formatResources', () => { const output = formatResources(resources); // Should have header with count - expect(output).toContain('Available resources (2):'); + expect(output).toContain('Resources (2):'); // Should have summary list expect(output).toContain('* `file:///home/user/data.json`'); @@ -1024,7 +1024,7 @@ describe('formatResources', () => { it('should show empty list message for no resources', () => { const resources: Resource[] = []; const output = formatResources(resources); - expect(output).toContain('Available resources (0):'); + expect(output).toContain('Resources (0):'); }); }); @@ -1092,7 +1092,7 @@ describe('formatResourceTemplates', () => { const output = formatResourceTemplates(templates); // Should have header with count - expect(output).toContain('Available resource templates (2):'); + expect(output).toContain('Resource templates (2):'); // Should have summary list expect(output).toContain('* `file:///{path}`'); @@ -1152,7 +1152,7 @@ describe('formatPrompts', () => { const output = formatPrompts(prompts); // Should have header with count - expect(output).toContain('Available prompts (2):'); + expect(output).toContain('Prompts (2):'); // Should have summary list expect(output).toContain('* `greeting`'); From 90585ac9fbb39aa15b756fcf85468f13f7b1216e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Mar 2026 22:05:45 +0000 Subject: [PATCH 3/3] Fix e2e test assertions to match updated header text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update human-output e2e test to match renamed headers: "Available tools/resources/prompts/templates" → "Tools/Resources/Prompts/Templates" https://claude.ai/code/session_01Lr6hQ855QQbCKCtyspknw2 --- test/e2e/suites/basic/human-output.test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/suites/basic/human-output.test.sh b/test/e2e/suites/basic/human-output.test.sh index caa210fd..e2565b65 100755 --- a/test/e2e/suites/basic/human-output.test.sh +++ b/test/e2e/suites/basic/human-output.test.sh @@ -25,7 +25,7 @@ test_pass test_case "tools-list contains header with count" run_mcpc "$SESSION" tools-list assert_success -assert_contains "$STDOUT" "Available tools" +assert_contains "$STDOUT" "Tools (" test_pass test_case "tools-list contains tool names in backticks" @@ -86,7 +86,7 @@ test_pass test_case "resources-list contains header with count" run_mcpc "$SESSION" resources-list assert_success -assert_contains "$STDOUT" "Available resources" +assert_contains "$STDOUT" "Resources (" test_pass test_case "resources-list contains resource URIs" @@ -114,7 +114,7 @@ test_pass test_case "resources-templates-list contains header" run_mcpc "$SESSION" resources-templates-list assert_success -assert_contains "$STDOUT" "Available resource templates" +assert_contains "$STDOUT" "Resource templates (" test_pass test_case "resources-templates-list contains URI templates" @@ -130,7 +130,7 @@ test_pass test_case "prompts-list contains header with count" run_mcpc "$SESSION" prompts-list assert_success -assert_contains "$STDOUT" "Available prompts" +assert_contains "$STDOUT" "Prompts (" test_pass test_case "prompts-list contains prompt names"