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

Function formatChangeError

backend/api/mcp/tool_change.go:576–582  ·  view source on GitHub ↗

formatChangeError formats a changeError into an MCP error result.

(err *changeError)

Source from the content-addressed store, hash-verified

574
575// formatChangeError formats a changeError into an MCP error result.
576func formatChangeError(err *changeError) *mcp.CallToolResult {
577 jsonBytes, _ := json.MarshalIndent(err, "", " ")
578 return &mcp.CallToolResult{
579 Content: []mcp.Content{&mcp.TextContent{Text: string(jsonBytes)}},
580 IsError: true,
581 }
582}
583
584// formatChangeStepError formats a step failure into an MCP error result.
585// It detects permission errors and wraps them appropriately.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected