MCPcopy Create free account
hub / github.com/MicrosoftDocs/mcp / createDefaultContext

Function createDefaultContext

cli/src/context.ts:11–27  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

9}
10
11export function createDefaultContext(version: string): CliContext {
12 return {
13 env: process.env,
14 version,
15 writeOut: (value) => {
16 process.stdout.write(value);
17 },
18 writeErr: (value) => {
19 process.stderr.write(value);
20 },
21 createClient: (options) =>
22 createLearnCliClient({
23 clientVersion: version,
24 ...options,
25 }),
26 };
27}

Callers 1

runCliFunction · 0.85

Calls 2

createLearnCliClientFunction · 0.85
writeMethod · 0.65

Tested by

no test coverage detected