MCPcopy Create free account
hub / github.com/compozy/agh / workspaceInfo

Method workspaceInfo

internal/daemon/native_tools.go:2298–2317  ·  view source on GitHub ↗
(
	ctx context.Context,
	_ toolspkg.Scope,
	req toolspkg.CallRequest,
)

Source from the content-addressed store, hash-verified

2296}
2297
2298func (n *daemonNativeTools) workspaceInfo(
2299 ctx context.Context,
2300 _ toolspkg.Scope,
2301 req toolspkg.CallRequest,
2302) (toolspkg.ToolResult, error) {
2303 var input workspaceRefInput
2304 if err := decodeNativeInput(req, &input); err != nil {
2305 return toolspkg.ToolResult{}, err
2306 }
2307 ref, err := requiredNativeString(req.ToolID, nativeToolsWorkspaceKey, input.Workspace)
2308 if err != nil {
2309 return toolspkg.ToolResult{}, err
2310 }
2311 workspace, err := n.deps.Workspaces.Get(ctx, ref)
2312 if err != nil {
2313 return toolspkg.ToolResult{}, err
2314 }
2315 payload := core.WorkspacePayloadFromWorkspace(workspace)
2316 return structuredResult(map[string]any{nativeToolsWorkspaceKey: payload}, payload.ID)
2317}
2318
2319func (n *daemonNativeTools) workspaceDescribe(
2320 ctx context.Context,

Callers

nothing calls this directly

Calls 5

decodeNativeInputFunction · 0.85
requiredNativeStringFunction · 0.85
structuredResultFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected