MCPcopy Create free account
hub / github.com/astercloud/aster / get

Method get

pkg/middleware/logic_memory_tools.go:158–170  ·  view source on GitHub ↗
(ctx context.Context, namespace string, input map[string]any)

Source from the content-addressed store, hash-verified

156}
157
158func (t *LogicMemoryQueryTool) get(ctx context.Context, namespace string, input map[string]any) (string, error) {
159 key, ok := input["key"].(string)
160 if !ok || key == "" {
161 return "", errors.New("key is required for 'get' action")
162 }
163
164 memory, err := t.manager.GetMemory(ctx, namespace, key)
165 if err != nil {
166 return "", fmt.Errorf("memory not found: %w", err)
167 }
168
169 return t.formatSingleMemoryAsMarkdown(memory), nil
170}
171
172func (t *LogicMemoryQueryTool) search(ctx context.Context, namespace string, input map[string]any) (string, error) {
173 memoryType, ok := input["type"].(string)

Callers 1

ExecuteMethod · 0.95

Calls 2

GetMemoryMethod · 0.45

Tested by

no test coverage detected