docs: decision record for tool result payloads and excerpts

Adds docs/tool-result-payloads.md covering PRs #27-#29: why every tool
result repeats its payload as JSON text (claude.ai ignores
structuredContent; client detection and structured-only were rejected),
why memory_list / memory_search return excerpts (named to avoid the
snippet.* tools), and why excerpts weight rare query terms rather than
using ts_headline (tested; it picked the same wrong passage).

Links it from the README design notes, adds two troubleshooting entries,
and marks the "same 9 fields as list/search" claims in the earlier
decision record and in memory.get's comment as superseded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Opus 5.5 committed 2026-11-14 11:24:14 -08:00
1 parent 3da0c77849
commit c4f5231be9
4 files changed
+174 -3

No files matched your search

+12
View File
@@ -785,6 +785,11 @@ reopen a closed question.
refuses ambiguous matches instead of guessing, why `memory_append` was
dropped, and why file-mirroring was left as a convention rather than
mechanised.
- [`docs/tool-result-payloads.md`](docs/tool-result-payloads.md) — why every
tool result repeats its payload as JSON text (claude.ai ignores
`structuredContent`), why `memory_list` / `memory_search` return a ~200-char
`excerpt` instead of the full body (use `memory_get` or `full: true`), and
why excerpts weight rare query terms instead of using `ts_headline`.
---
@@ -803,6 +808,13 @@ reopen a closed question.
for your `--callback-port`, and a portless `http://localhost/callback` entry
will not match it. Authentik has no Dynamic Client Registration, so no client
can add the URI itself — see **Which redirect URIs to register** above.
- **claude.ai gets only `"N result(s)"` from `memory_search` / `memory_list`,
with no ids or content** — the server predates PR #27, which repeats every
result's payload as JSON text; claude.ai ignores `structuredContent`. Deploy
a current build, then reconnect the connector. Claude Code was never
affected. See [`docs/tool-result-payloads.md`](docs/tool-result-payloads.md).
- **`memory_search` / `memory_list` show an `excerpt`, not the full memory** —
by design since PR #28. Call `memory_get` with the id, or pass `full: true`.
- **Auth.js callback fails with `OAUTH_CALLBACK_ERROR`** — your `PUBLIC_URL`
doesn't match the redirect URI your IdP is configured with. They must be
exactly equal, scheme and trailing slash included.