Skip to content

Commit 16c180f

Browse files
Add global configuration support for session response formatting
1 parent 89b035b commit 16c180f

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/tools/live.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// File: src/tools/live.ts
21
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
32
import { z } from "zod";
43
import logger from "../logger.js";
54
import { startBrowserSession } from "./live-utils/start-session.js";
65
import { PlatformType } from "./live-utils/types.js";
76
import { trackMCP } from "../lib/instrumentation.js";
87
import { BrowserStackConfig } from "../lib/types.js";
8+
import globalConfig from "../config.js";
99

1010
// Define the schema shape
1111
const LiveArgsShape = {
@@ -97,13 +97,24 @@ async function runBrowserSession(rawArgs: any, config: BrowserStackConfig) {
9797
? await launchDesktopSession(args, config)
9898
: await launchMobileSession(args, config);
9999

100-
return {
101-
content: [
100+
let response=[
102101
{
103102
type: "text" as const,
104103
text: `✅ Session started. If it didn't open automatically, visit:\n${launchUrl}`,
105104
},
106-
],
105+
];
106+
107+
if (globalConfig.REMOTE_MCP) {
108+
response = [
109+
{
110+
type: "text" as const,
111+
text: `✅ To start the session. Click on ${launchUrl}`,
112+
},
113+
];
114+
}
115+
116+
return {
117+
content: response,
107118
};
108119
}
109120

0 commit comments

Comments
 (0)