types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ToolDefinition

type ToolDefinition struct {
	// McpTool is the MCP tool definition (including name and description)
	McpTool *mcp.Tool
	// ValidationPolicy allows modification of in-built validation rules and constraints for the tool's execution
	ValidationPolicy *ToolValidationPolicy
}

func (*ToolDefinition) IsReadOnly

func (t *ToolDefinition) IsReadOnly() bool

IsReadOnly returns true if the tool is read-only and does not modify its environment. It checks the McpTool.Annotations.ReadOnlyHint field.

type ToolValidationPolicy

type ToolValidationPolicy struct {
	// AllowProductionEnvironmentWrite when set to true, allows the tool to make write operations on production-type environments.
	// When false (default), write operations on PRODUCTION environments are blocked to prevent unintended changes.
	// This modifier only applies to WRITE operations; READ operations are governed by AllowProductionEnvironmentRead.
	AllowProductionEnvironmentWrite bool
	// AllowProductionEnvironmentRead when set to true, allows the tool to make read operations on production-type environments.
	// When false (default), read operations on PRODUCTION environments are blocked.
	// This modifier only applies to READ operations; WRITE operations are governed by AllowProductionEnvironmentWrite.
	AllowProductionEnvironmentRead bool
	// ProductionEnvironmentNotApplicable when set to true, indicates that the tool does not operate on environments
	// and therefore production environment validation should be skipped entirely.
	// This is typically used for tools that don't have an environmentId parameter (e.g., list_environments) or operate at the organization level.
	// When true, both AllowProductionEnvironmentWrite and AllowProductionEnvironmentRead are ignored.
	ProductionEnvironmentNotApplicable bool
}

Jump to

Keyboard shortcuts

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