MCPcopy Create free account
hub / github.com/bytebase/bytebase / getWorkspaceID

Function getWorkspaceID

backend/api/mcp/tool_http.go:122–127  ·  view source on GitHub ↗

getWorkspaceID retrieves the workspace ID from the context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

120
121// getWorkspaceID retrieves the workspace ID from the context.
122func getWorkspaceID(ctx context.Context) string {
123 if id, ok := ctx.Value(workspaceIDKey{}).(string); ok {
124 return id
125 }
126 return ""
127}

Callers 2

listDatabasesMethod · 0.85
TestWorkspaceIDContextFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWorkspaceIDContextFunction · 0.68