hostedtool

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package hostedtool provides definitions for hosted tools.

Hosted tools do not themselves implement functionality. They are markers that can be used to inform a service that the service is allowed to perform certain actions if the service is capable of doing so.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeInterpreter

type CodeInterpreter struct {
	AdditionalProperties map[string]any

	Inputs []message.Content
}

CodeInterpreter represents a hosted tool that can be specified to an AI service to enable it to execute code it generates.

func (*CodeInterpreter) Description

func (t *CodeInterpreter) Description() string

func (*CodeInterpreter) Name

func (t *CodeInterpreter) Name() string

type FileSearch

type FileSearch struct {
	AdditionalProperties map[string]any

	Inputs             []message.Content
	MaximumResultCount int
}

FileSearch represents a hosted tool that can be specified to an AI service to enable it to perform file search operations.

func (*FileSearch) Description

func (t *FileSearch) Description() string

func (*FileSearch) Name

func (t *FileSearch) Name() string

type MCPApprovalMode added in v0.1.1

type MCPApprovalMode string

MCPApprovalMode controls whether hosted MCP tool calls require human approval.

const (
	// MCPApprovalAlways requires approval for every hosted MCP tool call.
	MCPApprovalAlways MCPApprovalMode = "always"
	// MCPApprovalNever auto-approves hosted MCP tool calls.
	MCPApprovalNever MCPApprovalMode = "never"
)

type MCPServer

type MCPServer struct {
	// AdditionalProperties holds provider-specific properties that are not
	// represented by the other fields.
	AdditionalProperties map[string]any

	// ServerName is the name used to identify the MCP server.
	ServerName string
	// ServerDescription is an optional human-readable description of the MCP server.
	ServerDescription string
	// ServerAddress is the URL of the remote MCP server.
	ServerAddress string
	// Authorization is an optional authorization token used when connecting to the MCP server.
	Authorization string
	// AllowedTools optionally restricts the set of tools that may be invoked on the MCP server.
	AllowedTools []string
	// Headers contains optional HTTP headers to send when connecting to the MCP server.
	Headers map[string]string
	// ApprovalMode controls whether calls to this MCP server require approval.
	// The zero value leaves the provider default (which, for the OpenAI Responses
	// API, requires approval for every call).
	ApprovalMode MCPApprovalMode
}

MCPServer represents a hosted tool that can be specified to an AI service to enable it to invoke tools exposed by a remote MCP server.

func (*MCPServer) Description

func (t *MCPServer) Description() string

func (*MCPServer) Name

func (t *MCPServer) Name() string

type WebSearch

type WebSearch struct {
	AdditionalProperties map[string]any
}

WebSearch represents a hosted tool that can be specified to an AI service to enable it to perform web searches.

func (*WebSearch) Description

func (t *WebSearch) Description() string

func (*WebSearch) Name

func (t *WebSearch) Name() string

Jump to

Keyboard shortcuts

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