Skip to content

Commit b6bbdf8

Browse files
committed
fix: rename 'MCP Tool' to 'Gateway Target' in UI labels, CLI output, and comments
1 parent a01c36f commit b6bbdf8

23 files changed

+42
-42
lines changed

src/cli/commands/add/__tests__/add-gateway-target.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { tmpdir } from 'node:os';
55
import { join } from 'node:path';
66
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
77

8-
// MCP Tool feature is disabled (coming soon) - skip all tests
8+
// Gateway Target feature is disabled (coming soon) - skip all tests
99
describe.skip('add gateway-target command', () => {
1010
let testDir: string;
1111
let projectDir: string;

src/cli/commands/add/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export async function handleAddGateway(options: ValidatedAddGatewayOptions): Pro
283283
}
284284
}
285285

286-
// MCP Tool handler
286+
// Gateway Target handler
287287
export function buildGatewayTargetConfig(options: ValidatedAddGatewayTargetOptions): AddGatewayTargetConfig {
288288
const sourcePath = `${APP_DIR}/${MCP_APP_SUBDIR}/${options.name}`;
289289

src/cli/commands/add/command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async function handleAddGatewayTargetCLI(options: AddGatewayTargetOptions): Prom
131131
if (options.json) {
132132
console.log(JSON.stringify(result));
133133
} else if (result.success) {
134-
console.log(`Added MCP tool '${result.toolName}'`);
134+
console.log(`Added gateway target '${result.toolName}'`);
135135
if (result.sourcePath) {
136136
console.log(`Tool code: ${result.sourcePath}`);
137137
}

src/cli/commands/add/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface AddGatewayResult {
4141
error?: string;
4242
}
4343

44-
// MCP Tool types
44+
// Gateway Target types
4545
export interface AddGatewayTargetOptions {
4646
name?: string;
4747
description?: string;

src/cli/commands/add/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export function validateAddGatewayOptions(options: AddGatewayOptions): Validatio
183183
return { valid: true };
184184
}
185185

186-
// MCP Tool validation
186+
// Gateway Target validation
187187
export async function validateAddGatewayTargetOptions(options: AddGatewayTargetOptions): Promise<ValidationResult> {
188188
if (!options.name) {
189189
return { valid: false, error: '--name is required' };

src/cli/commands/remove/__tests__/remove-gateway-target.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { tmpdir } from 'node:os';
55
import { join } from 'node:path';
66
import { afterAll, beforeAll, describe, expect, it } from 'vitest';
77

8-
// MCP Tool feature is disabled (coming soon) - skip all tests
8+
// Gateway Target feature is disabled (coming soon) - skip all tests
99
describe.skip('remove gateway-target command', () => {
1010
let testDir: string;
1111
let projectDir: string;

src/cli/commands/remove/actions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ export async function handleRemove(options: ValidatedRemoveOptions): Promise<Rem
4949
case 'gateway-target': {
5050
const tools = await getRemovableGatewayTargets();
5151
const tool = tools.find(t => t.name === name);
52-
if (!tool) return { success: false, error: `MCP tool '${name}' not found` };
52+
if (!tool) return { success: false, error: `Gateway target '${name}' not found` };
5353
const result = await removeGatewayTarget(tool);
5454
if (!result.ok) return { success: false, error: result.error };
5555
return {
5656
success: true,
5757
resourceType,
5858
resourceName: name,
59-
message: `Removed MCP tool '${name}'`,
59+
message: `Removed gateway target '${name}'`,
6060
note: SOURCE_CODE_NOTE,
6161
};
6262
}

src/cli/commands/remove/command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const registerRemove = (program: Command) => {
142142
registerResourceRemove(removeCommand, 'memory', 'memory', 'Remove a memory provider from the project');
143143
registerResourceRemove(removeCommand, 'identity', 'identity', 'Remove an identity provider from the project');
144144

145-
registerResourceRemove(removeCommand, 'gateway-target', 'gateway-target', 'Remove an MCP tool from the project');
145+
registerResourceRemove(removeCommand, 'gateway-target', 'gateway-target', 'Remove a gateway target from the project');
146146

147147
registerResourceRemove(removeCommand, 'gateway', 'gateway', 'Remove a gateway from the project');
148148

src/cli/operations/mcp/create-mcp.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function readMcpDefs(filePath: string): Promise<AgentCoreCliMcpDefs> {
4545
const parsed = JSON.parse(raw) as unknown;
4646
const result = AgentCoreCliMcpDefsSchema.safeParse(parsed);
4747
if (!result.success) {
48-
throw new Error('Invalid mcp-defs.json. Fix it before adding a new MCP tool.');
48+
throw new Error('Invalid mcp-defs.json. Fix it before adding a new gateway target.');
4949
}
5050
return result.data;
5151
}
@@ -211,7 +211,7 @@ export async function createGatewayFromWizard(config: AddGatewayConfig): Promise
211211

212212
function validateGatewayTargetLanguage(language: string): asserts language is 'Python' | 'TypeScript' | 'Other' {
213213
if (language !== 'Python' && language !== 'TypeScript' && language !== 'Other') {
214-
throw new Error(`MCP tools for language "${language}" are not yet supported.`);
214+
throw new Error(`Gateway targets for language "${language}" are not yet supported.`);
215215
}
216216
}
217217

@@ -288,7 +288,7 @@ export async function createExternalGatewayTarget(config: AddGatewayTargetConfig
288288
}
289289

290290
/**
291-
* Create an MCP tool (behind gateway only).
291+
* Create a gateway target (behind gateway only).
292292
*/
293293
export async function createToolFromWizard(config: AddGatewayTargetConfig): Promise<CreateToolResult> {
294294
validateGatewayTargetLanguage(config.language);
@@ -400,7 +400,7 @@ export async function createToolFromWizard(config: AddGatewayTargetConfig): Prom
400400
throw new Error(`MCP saved, but failed to update mcp-defs.json: ${message}`);
401401
}
402402

403-
// Render MCP tool project template
403+
// Render gateway target project template
404404
// Resolve absolute path from project root
405405
const configRoot = requireConfigRoot();
406406
const projectRoot = dirname(configRoot);

src/cli/operations/remove/remove-gateway-target.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { rm } from 'fs/promises';
66
import { join } from 'path';
77

88
/**
9-
* Represents an MCP tool that can be removed.
9+
* Represents a gateway target that can be removed.
1010
*/
1111
export interface RemovableGatewayTarget {
1212
name: string;
@@ -15,7 +15,7 @@ export interface RemovableGatewayTarget {
1515
}
1616

1717
/**
18-
* Get list of MCP tools available for removal.
18+
* Get list of gateway targets available for removal.
1919
*/
2020
export async function getRemovableGatewayTargets(): Promise<RemovableGatewayTarget[]> {
2121
try {
@@ -44,7 +44,7 @@ export async function getRemovableGatewayTargets(): Promise<RemovableGatewayTarg
4444
}
4545

4646
/**
47-
* Compute the preview of what will be removed when removing an MCP tool.
47+
* Compute the preview of what will be removed when removing a gateway target.
4848
*/
4949
export async function previewRemoveGatewayTarget(tool: RemovableGatewayTarget): Promise<RemovalPreview> {
5050
const configIO = new ConfigIO();
@@ -150,7 +150,7 @@ function computeRemovedToolMcpDefs(
150150
}
151151

152152
/**
153-
* Remove an MCP tool from the project.
153+
* Remove a gateway target from the project.
154154
*/
155155
export async function removeGatewayTarget(tool: RemovableGatewayTarget): Promise<RemovalResult> {
156156
try {

0 commit comments

Comments
 (0)