Files
ombi-mcp/internal/tools/results.go
gronod 4022d30fe6 Harmonise schema docs and land Go interface baseline (Phase 06)
Sync the remaining ledger docs to the read_*/write_* namespace and
finalized schemas: publish the MCP->wire parameter mapping appendix,
record JWT-primary auth and season-mode/defaults decisions in the
ledger and verification docs, and document notificationTemplates
label translation. Add docs/schema/08-go-baseline.md and implement
the compile-level type baseline: config loading/validation,
AuthManager skeleton, upstream Client.Do contract, tool arg structs,
and the shared result envelope.
2026-09-18 16:35:04 +01:00

22 lines
834 B
Go

package tools
// ToolResult is the structuredContent payload for every tool.
type ToolResult struct {
OK bool `json:"ok"`
Operation string `json:"operation"` // tool name
Data any `json:"data,omitempty"` // one family object
Error *ToolError `json:"error,omitempty"`
Warnings []string `json:"warnings"`
Truncated bool `json:"truncated"`
CorrelationID string `json:"correlation_id"`
}
type ToolError struct {
Code string `json:"code"` // INVALID_ARGUMENT … INTERNAL_ERROR
Message string `json:"message"`
Retryable bool `json:"retryable"`
HTTPStatus *int `json:"http_status,omitempty"`
Field string `json:"field,omitempty"`
RetryAfterSeconds *int `json:"retry_after_seconds,omitempty"`
}