buildMemoryBlockTool
function buildMemoryBlockTool(opts): Tool<{ action: "replace" | "view" | "add" | "remove"; block: string; content?: string; match?: string; scope?: "user" | "agent" | "shared";}, | { action?: undefined; block: string; chars?: undefined; content: string; empty: boolean; error?: undefined; limit?: undefined; matched?: undefined; message?: undefined; note?: undefined; ok?: undefined; pattern?: undefined; remainingChars?: undefined; removed?: undefined; scope: MemoryBlockScope; updatedAt?: undefined;} | { action?: undefined; block: string; chars: number; content: string; empty?: undefined; error?: undefined; limit?: undefined; matched?: undefined; message?: undefined; note?: undefined; ok?: undefined; pattern?: undefined; remainingChars?: undefined; removed?: undefined; scope: MemoryBlockScope; updatedAt: string | undefined;} | { action?: undefined; block?: undefined; chars?: undefined; content?: undefined; empty?: undefined; error: string; limit?: undefined; matched?: undefined; message: string; note?: undefined; ok?: undefined; pattern?: undefined; remainingChars?: undefined; removed?: undefined; scope?: undefined; updatedAt?: undefined;} | { action?: undefined; block?: undefined; chars?: undefined; content?: undefined; empty?: undefined; error?: undefined; limit?: undefined; matched?: undefined; message?: undefined; note: string; ok: boolean; pattern?: undefined; remainingChars?: undefined; removed: number; scope?: undefined; updatedAt?: undefined;} | { action?: undefined; block?: undefined; chars?: undefined; content?: undefined; empty?: undefined; error?: undefined; limit?: undefined; matched?: undefined; message?: undefined; note?: undefined; ok: boolean; pattern?: undefined; remainingChars: number; removed: number; scope?: undefined; updatedAt?: undefined;} | { action?: undefined; block?: undefined; chars?: undefined; content?: undefined; empty?: undefined; error: string; limit?: undefined; matched: string | undefined; message: string; note?: undefined; ok?: undefined; pattern: string | undefined; remainingChars?: undefined; removed?: undefined; scope?: undefined; updatedAt?: undefined;} | { action?: undefined; block?: undefined; chars: number; content?: undefined; empty?: undefined; error: string; limit: number; matched?: undefined; message: string; note?: undefined; ok?: undefined; pattern?: undefined; remainingChars?: undefined; removed?: undefined; scope?: undefined; updatedAt?: undefined;} | { action: "replace" | "add"; block: string; chars: number; content?: undefined; empty?: undefined; error?: undefined; limit: number; matched?: undefined; message?: undefined; note?: undefined; ok: boolean; pattern?: undefined; remainingChars?: undefined; removed?: undefined; scope: MemoryBlockScope; updatedAt?: undefined;}>;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Tool<{
action: "replace" | "view" | "add" | "remove";
block: string;
content?: string;
match?: string;
scope?: "user" | "agent" | "shared";
},
| {
action?: undefined;
block: string;
chars?: undefined;
content: string;
empty: boolean;
error?: undefined;
limit?: undefined;
matched?: undefined;
message?: undefined;
note?: undefined;
ok?: undefined;
pattern?: undefined;
remainingChars?: undefined;
removed?: undefined;
scope: MemoryBlockScope;
updatedAt?: undefined;
}
| {
action?: undefined;
block: string;
chars: number;
content: string;
empty?: undefined;
error?: undefined;
limit?: undefined;
matched?: undefined;
message?: undefined;
note?: undefined;
ok?: undefined;
pattern?: undefined;
remainingChars?: undefined;
removed?: undefined;
scope: MemoryBlockScope;
updatedAt: string | undefined;
}
| {
action?: undefined;
block?: undefined;
chars?: undefined;
content?: undefined;
empty?: undefined;
error: string;
limit?: undefined;
matched?: undefined;
message: string;
note?: undefined;
ok?: undefined;
pattern?: undefined;
remainingChars?: undefined;
removed?: undefined;
scope?: undefined;
updatedAt?: undefined;
}
| {
action?: undefined;
block?: undefined;
chars?: undefined;
content?: undefined;
empty?: undefined;
error?: undefined;
limit?: undefined;
matched?: undefined;
message?: undefined;
note: string;
ok: boolean;
pattern?: undefined;
remainingChars?: undefined;
removed: number;
scope?: undefined;
updatedAt?: undefined;
}
| {
action?: undefined;
block?: undefined;
chars?: undefined;
content?: undefined;
empty?: undefined;
error?: undefined;
limit?: undefined;
matched?: undefined;
message?: undefined;
note?: undefined;
ok: boolean;
pattern?: undefined;
remainingChars: number;
removed: number;
scope?: undefined;
updatedAt?: undefined;
}
| {
action?: undefined;
block?: undefined;
chars?: undefined;
content?: undefined;
empty?: undefined;
error: string;
limit?: undefined;
matched: string | undefined;
message: string;
note?: undefined;
ok?: undefined;
pattern: string | undefined;
remainingChars?: undefined;
removed?: undefined;
scope?: undefined;
updatedAt?: undefined;
}
| {
action?: undefined;
block?: undefined;
chars: number;
content?: undefined;
empty?: undefined;
error: string;
limit: number;
matched?: undefined;
message: string;
note?: undefined;
ok?: undefined;
pattern?: undefined;
remainingChars?: undefined;
removed?: undefined;
scope?: undefined;
updatedAt?: undefined;
}
| {
action: "replace" | "add";
block: string;
chars: number;
content?: undefined;
empty?: undefined;
error?: undefined;
limit: number;
matched?: undefined;
message?: undefined;
note?: undefined;
ok: boolean;
pattern?: undefined;
remainingChars?: undefined;
removed?: undefined;
scope: MemoryBlockScope;
updatedAt?: undefined;
}>