tools

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SchemaTypeObject = "object"
	SchemaTypeString = "string"
	SchemaTypeArray  = "array"
)
View Source
const (
	ResourceName        = "name"
	PatternResourceName = "^[a-zA-Z0-9_.-]+$"
)

Variables

Functions

This section is empty.

Types

type Resource

type Resource string
const (
	DashboardResource          Resource = "dashboard"
	EphemeralDashboardResource Resource = "ephemeraldashboard"
	DatasourceResource         Resource = "datasource"
	ProjectResource            Resource = "project"
	GlobalDatasourceResource   Resource = "globaldatasource"
	RoleResource               Resource = "role"
	GlobalRoleResource         Resource = "globalrole"
	RoleBindingResource        Resource = "rolebinding"
	GlobalRoleBindingResource  Resource = "globalrolebinding"
	VariableResource           Resource = "variable"
	GlobalVariableResource     Resource = "globalvariable"
	PluginResource             Resource = "plugin"
)

type Tool

type Tool struct {
	MCPTool     *mcp.Tool
	IsWriteTool bool
	// ResourceType identifies which toolset this tool belongs to (e.g., "dashboard", "project", "globaldatasource")
	ResourceType Resource
	// RegisterWith registers this tool with the given MCP server
	// This function encapsulates the typed handler registration
	RegisterWith func(server *mcp.Server)
}

Tool represents an MCP tool with metadata about write access requirements

Jump to

Keyboard shortcuts

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