store_contextTetherPersist a structured memory so any participating site can retrieve it later.
- in
- { content, category?, tags?, source?, confidence? }
- out
- { memory, duplicate }
Tether exposes four memory tools of its own. Each participating site adds tools that do something real in that product and route through the same shared layer.
Constrained input schemas, predictable structured output, and a genuine product purpose behind each one.
store_contextTetherPersist a structured memory so any participating site can retrieve it later.
retrieve_contextTetherReturn the memories most relevant to a query, ranked, with the reason each matched.
update_contextTetherCorrect or refine a memory Tether already holds, by id or by matching text.
delete_contextTetherPermanently remove a memory so no site can retrieve it again.
save_preferenceDesignLabApply a design preference locally and write it to Tether in one call.
remember_preferenceDesignLabRemember an arbitrary preference stated in the user's own words — anything the built-in toggles cannot express.
get_preferencesDesignLabRead what DesignLab has applied plus what Tether already knows.
get_user_contextDevForgeFetch project-relevant preferences from Tether without generating anything yet.
create_projectDevForgeScaffold a project configured from stored preferences: language, theme, density, framework, package manager, styling.
apply_preferencesDevForgeApply or drop Tether context on the open project, so provenance is visible.
Excerpts from the files that ship in this repository.
1// Locate the page's model context across every shape currently in the wild.2export function discoverModelContext(): ModelContextHandle | null {3 const candidates = [4 ["navigator.modelContext", navigator.modelContext],5 ["window.modelContext", window.modelContext],6 ["document.modelContext", document.modelContext],7 ];89 for (const [host, candidate] of candidates) {10 if (typeof candidate?.registerTool === "function")11 return { context: candidate, host, api: "registerTool" };12 if (typeof candidate?.provideContext === "function")13 return { context: candidate, host, api: "provideContext" };14 }1516 return null; // No agent present. The UI says so; it never fakes a call.17}1819export function registerTools(handle, tools) {20 for (const tool of tools) handle.context.registerTool(tool);21}The adapter probes navigator.modelContext, window.modelContext, and document.modelContext, and supports both the imperative registerTool() and declarative provideContext() shapes, because different WebMCP builds expose different ones. When none is present, the UI reports that plainly rather than simulating an agent.
/api/memoryCreate one structured memory. Idempotent on content./api/memoryList every memory for the session. Optional source/category filters./api/memory/search?q=Ranked retrieval with per-memory match reasons./api/memory/:idFetch one memory by id./api/memory/:idRefine content, category, tags, or confidence./api/memory/:idPermanent removal. The human control path./api/activityServer-persisted WebMCP event log, shared across tabs./api/healthStore driver and liveness for the status pill.This is a hackathon demo, not a production data platform. Here is exactly what it does and does not do.
The Supabase service-role key is read only inside server-only modules. The client never sees a database credential; it talks to same-origin route handlers.
Each visitor gets an opaque random id in an httpOnly first-party cookie. There are no accounts and no personal data: one visitor's demo can never appear in another's feed.
Tool arguments and API bodies pass through Zod schemas before reaching the store: length caps, category enums, tag limits, and a bounded confidence score.
DELETE removes the row. There is no archive table and no soft-delete flag. Once removed, retrieve_context cannot return it to any site.
What this is not: Tether does not claim production-grade privacy or security. There is no authentication, no encryption at rest beyond what the database provides, and no multi-user isolation past the session cookie. Do not store sensitive personal data in it.