scriptlingmcp

package module
v0.0.0-...-e8bb9d1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeToolContent

func DecodeToolContent(content mcp.ToolContent) object.Object

DecodeToolContent converts a single ToolContent block to a scriptling Object.

func DecodeToolResponse

func DecodeToolResponse(response *mcp.ToolResponse) object.Object

DecodeToolResponse converts an MCP ToolResponse to a scriptling Object. Handles: - Single text content: returns parsed JSON or string - Multiple content blocks: returns list of decoded blocks - Structured content: returns decoded object

func DictToMap

func DictToMap(dict *object.Dict) map[string]interface{}

DictToMap converts a scriptling Dict to a Go map[string]interface{}. This is a convenience wrapper around scriptlib.ToGo for the common case of converting Dict arguments for tool calls.

func ParseToolSearchResults

func ParseToolSearchResults(response *mcp.ToolResponse) (*object.List, error)

ParseToolSearchResults extracts tool list from tool_search response. Returns a scriptling List containing tool dicts with name, description, input_schema. The tool_search response is expected to be a ToolResponse with JSON text content containing an array of tool definitions.

func ParseToolSearchResultsFromText

func ParseToolSearchResultsFromText(text string) (*object.List, error)

ParseToolSearchResultsFromText parses tool search results from a JSON string. This is a convenience function when you already have the JSON text extracted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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