tools

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tools defines tool input/output types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResult

type ErrorResult struct {
	Message string
}

ErrorResult represents a tool execution error.

type QueryInput

type QueryInput struct {
	SQL    string `json:"sql"`
	Status string `json:"status"`
	Result string `json:"result"`
}

QueryInput is the input schema for the query tool.

type QueryResult

type QueryResult struct {
	Rows        []map[string]any `json:"rows"`
	RowsDropped int              `json:"rows_dropped,omitempty"`
}

QueryResult is the typed output of a query tool execution.

func (QueryResult) ToMap

func (r QueryResult) ToMap() map[string]any

ToMap serializes the result for the GraphQL API.

type Result

type Result struct {
	ToolUseID string
	Content   map[string]any // serialized tool result
	Error     *ErrorResult
}

Result holds a tool result with serialized content.

func (Result) IsError

func (r Result) IsError() bool

IsError returns true if this result represents an error.

func (Result) ToMap

func (r Result) ToMap() map[string]any

ToMap serializes the result for the GraphQL API.

type SetServiceEnabledInput added in v1.15.0

type SetServiceEnabledInput struct {
	ServiceID domain.ServiceID `json:"service_id"`
	Enabled   bool             `json:"enabled"`
}

SetServiceEnabledInput is the input schema for the set_service_enabled tool.

type SetServiceEnabledResult added in v1.15.0

type SetServiceEnabledResult struct {
	ServiceID   domain.ServiceID `json:"service_id"`
	ServiceName string           `json:"service_name"`
	Enabled     bool             `json:"enabled"`
}

SetServiceEnabledResult is the typed output of a set_service_enabled tool execution.

func (SetServiceEnabledResult) ToMap added in v1.15.0

func (r SetServiceEnabledResult) ToMap() map[string]any

ToMap serializes the result for the GraphQL API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL