helpers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package helpers provides MCP result utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) *bool

BoolPtr returns a pointer to a bool value. Used for ToolAnnotations fields that are *bool.

func JSONResult

func JSONResult(data json.RawMessage) *mcp.CallToolResult

JSONResult wraps raw JSON bytes as a text MCP result.

func SetIfNotEmpty

func SetIfNotEmpty(m map[string]any, key, value string)

SetIfNotEmpty adds a key to the map only if the value is non-empty.

func ToolErrResult

func ToolErrResult(msg string) *mcp.CallToolResult

ToolErrResult returns an error MCP result with the given message.

func ValidateUUID

func ValidateUUID(id, fieldName, listHint string) (*mcp.CallToolResult, bool)

ValidateUUID checks that id is a valid UUID and returns an error result if not. Returns true if valid, false if invalid (caller should return the result).

Types

This section is empty.

Jump to

Keyboard shortcuts

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