memorytools

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 10 Imported by: ? 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

Overview

Package memorytools exposes Work's memory MCP tools (memory_search, memory_get, memory_create, memory_update, memory_delete, memory_create_batch, memory_delete_batch, memory_capabilities) with the same names, input schemas and result shapes, backed by memory.Service.

Index

Constants

This section is empty.

Variables

View Source
var Names = []string{"memory_search", "memory_get", "memory_create", "memory_update", "memory_delete",
	"memory_create_batch", "memory_delete_batch", "memory_capabilities"}

Names are the tools, in Work's order (MEMORY_MCP_ENABLED_TOOLS).

Functions

func EventValue

func EventValue(c memory.Change) map[string]any

EventValue is the work.memory payload of a change: {action: created | updated | proposed | deleted, id, path, title, text, status, contentHash, proposal? (create | update: what waits for the user), mode?, proposed? (deleted after untrusted content: soft, undoable)}. For a proposed update, title, text and contentHash are the proposal's (the entry keeps its confirmed content until the user keeps it).

func InputSchema

func InputSchema(name string) (map[string]any, bool)

InputSchema returns the JSON input schema of a tool (tests, docs).

Types

type Provider

type Provider struct {
	Svc *memory.Service
}

Provider offers the memory tools when the user's memory is enabled.

func New

func New(svc *memory.Service) *Provider

New returns the provider.

func (*Provider) Name

func (p *Provider) Name() string

Name implements tools.Provider.

func (*Provider) Tools

func (p *Provider) Tools(ctx context.Context, rc tools.RunContext) ([]ai.BaseTool, func(), error)

Tools implements tools.Provider.

Jump to

Keyboard shortcuts

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