Repository navigation
Open
Labels
Milestone
Description
Parent
What to build
A person asks their AI app "Where did we decide the venue budget?". The answer cannot link there, because no read tool returns a link. The app also cannot see which sentence a Comment quotes, so it misreads replies such as "too high".
After this change, get_outline and read_document return heading links, and list_chat_rooms returns chat links. read_chat_thread shows each Comment's quote.
Acceptance criteria
- One module in
apps/hocuspocus.server/src/lib/exportsbuildDocumentUrl(appUrl, slug)andbuildHeadingUrl(documentUrl, tocId | null).buildDocumentUrlencodes the slug.buildHeadingUrlencodes thetoc-id. - The digest's
sectionUrlis deleted. Digest tests pass with unchanged URLs. -
create_documentand the digest'swithResolvedNameusebuildDocumentUrl. -
get_outlinegives each node aurl, orurl: nullwhensection_idis null. -
read_documentcarriesurl: the heading link withsection_id, else the document link. -
list_chat_roomsgives each room aurlfrombuildChatActionUrl. A cold open of it opens that heading chat. - Links appear in the text, outside the data frame. The read tools return text only since Put document and heading titles inside the data frame in every MCP read #457, so there is no
structuredContentto fill. -
read_chat_threadshows a text Comment as(comment on: "<quote>"), capped at 200 characters, with line breaks as spaces. A media Comment shows(comment on media). Nosrc,html,captionorpreviewleaves the server. - From
metadata,readThreadselects only named paths (comment->>kind,comment->>content), never the whole object. - Tool descriptions,
docs/mcp/reference.mdandapps/hocuspocus.server/API.md§MCP connector name the new fields.
Blocked by
- Land a heading link on its heading, even when the heading is folded or filtered #338 — until it lands, a cold-opened heading link opens the top of the pad.
Agent brief
Type: AFK.
- Model the helpers on
buildChatActionUrl(apps/hocuspocus.server/src/lib/push/chatActionUrl.ts). The module imports nothing, so tests load it without Redis. - The browser writes Comment JSON (
apps/webapp/src/api/messages/sendCommentMessage.ts). So one pure function inmodules/mcp/domain/type-checks it. - Rules:
apps/hocuspocus.server/CLAUDE.md§MCP Connector and §Testability Seams.AGENTS.md§Test Policy (c): one formatter unit test, proved by sabotage. - Verify:
bun test src/modules/mcp tests/unit/contentChangeDigest.test.ts, typecheck, lint, format. Open each returnedurlin a fresh profile.
Out of scope
- The
via connected apptag — Mark MCP chat posts with a fixed connected-app metadata key #336. - Landing a cold-opened
?id=link — Land a heading link on its heading, even when the heading is folded or filtered #338.
Activity
[-]Add heading links and comment quotes to MCP reads[/-][+]Add links and Comment quotes to MCP reads[/+]HMarzban commentedon Oct 15, 2026
Related issues
get_outlineandlist_chat_roomslines. The url this issue adds per line must count toward Say when an MCP read leaves content out #380'sMAX_READ_CHARScut. Also, a criterion here namesstructuredContent, which Put document and heading titles inside the data frame in every MCP read #457 removed.withResolvedNameindigestContentChanges.ts. Add an "Unfollow this document" link to each document in the Change digest #449 buildsfollow_urlas${appUrl}/${slug}#follow. It should reusebuildDocumentUrlfrom this issue, which encodes the slug.Cross-link review, 2026-10-15. Generated by Claude Code