17 lines
509 B
Go
17 lines
509 B
Go
// types.go - Shared types for toolsrv
|
|
package toolsrv
|
|
|
|
// ToolResult is the structured result from a tool execution.
|
|
type ToolResult struct {
|
|
Content []ToolResultContent `json:"content"`
|
|
IsError bool `json:"isError,omitempty"`
|
|
}
|
|
|
|
// ToolResultContent is a single content item in a tool result.
|
|
type ToolResultContent struct {
|
|
Type string `json:"type"`
|
|
Text string `json:"text,omitempty"`
|
|
MediaType string `json:"mediaType,omitempty"`
|
|
Data string `json:"data,omitempty"`
|
|
}
|