read

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package read provides the MemoryRead tool for reading persistent memory entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inputs

type Inputs struct {
	Key   string `json:"key,omitempty" jsonschema:"description=Specific memory entry to read. Omit to list all entries in scope"`
	Scope string `` /* 162-byte string literal not displayed */
	Query string `json:"query,omitempty" jsonschema:"description=Keyword search across all memory entries in scope"`
}

Inputs defines the parameters for the MemoryRead tool.

type Tool

type Tool struct {
	tool.Base
	// contains filtered or unexported fields
}

Tool reads memory entries from disk.

func New

func New(configDir, globalHome string) *Tool

New creates a MemoryRead tool rooted at the given config and global home directories.

func (*Tool) Execute

func (t *Tool) Execute(_ context.Context, args map[string]any) (string, error)

Execute reads memory entries. Three modes:

  • key set: read that specific file
  • query set: search across all files for keyword matches
  • neither: list all files with their first line as summary

func (*Tool) Name

func (t *Tool) Name() string

Name returns the tool's identifier.

func (*Tool) Paths

func (t *Tool) Paths(_ context.Context, args map[string]any) (read, write []string, err error)

Paths returns the filesystem paths this tool call will access.

func (*Tool) Sandboxable

func (t *Tool) Sandboxable() bool

Sandboxable returns false as memory tools manage controlled paths in the filesystem.

func (*Tool) Schema

func (t *Tool) Schema() tool.Schema

Schema returns the tool definition.

Jump to

Keyboard shortcuts

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