automation

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 3 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 automation exposes tools from a Go app or library to nsgo mcp.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(cx *core.Scope, ctx context.Context, name string, args json.RawMessage) (json.RawMessage, error)

Call runs a registered tool on cx's graph and returns its JSON result. Call it on the graph goroutine, such as inside nsgotest.App.Post.

func Register

func Register(cx *core.Scope, tool Tool) error

Register gives a tool to cx's graph until cx is cleaned up. Names are unique on the graph and cannot replace built-in MCP tools. Call it on the graph goroutine. Registration is active in automation and test builds.

Types

type Tool

type Tool = core.AutomationTool

Tool describes an app tool. InputSchema is a JSON Schema object with type "object". Handler runs on the owning scope's graph goroutine. It reads a JSON object and returns a JSON-encodable result or an error.

Jump to

Keyboard shortcuts

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