Skip to content

feat(mcp): summary-by-default transcripts + new get_lesson_transcript tool - #46

Merged
unforced merged 1 commit into
mainfrom
feat/transcript-summary-architecture
May 4, 2026
Merged

feat(mcp): summary-by-default transcripts + new get_lesson_transcript tool#46
unforced merged 1 commit into
mainfrom
feat/transcript-summary-architecture

Conversation

@unforced

@unforced unforced commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

For tonight's Week 3 / Connectors session: get_lesson defaults to a short admin-written transcript summary instead of the full ~30-100K-char transcript markdown. The full transcript moves to a new dedicated tool, get_lesson_transcript, reached for explicitly when callers need verbatim quotes or specific moments.

Right architectural posture: student queries like "what did we cover in weeks 1 and 2" hit a cheap response (~15K chars instead of 110K), while "pull the verbatim transcript" stays available with one tool call. Aaron writes summaries via admin_upsert_lesson by piping the transcript through Claude during/before the session — itself a great live demo of the connector-as-collaborator workflow.

Migration 0022 (needs your migration approval)

ALTER TABLE lessons ADD COLUMN transcript_summary text;

Schema-only addition. Existing rows stay NULL until summarized. Verified locally.

get_lesson response shape

Drops transcriptMarkdown. Adds:

  • transcriptSummary — the short admin-written summary (NULL until written)
  • hasTranscript — boolean for existence of the full version
  • hasTranscriptSummary — boolean for the summary

recordingUrl stays (it's tiny — 80 chars). list_lessons gets the same hasTranscriptSummary flag so Claude can chain confidently.

Updated description steers callers: "The full session transcript is intentionally NOT in this response (it can be 30-100K chars per week and bloats context); reach for get_lesson_transcript when you need verbatim quotes or specific moments."

get_lesson_transcript (new tool)

Args: weekNumber (required), cohortSlug (optional → resolveActiveCohortSlug)
Returns: { cohortSlug, weekNumber, transcriptMarkdown, recordingUrl }

Description tells Claude to prefer get_lesson for the common case and reserve this for "I need verbatim."

admin_upsert_lesson

Adds optional transcriptSummary input. Aaron's live demo workflow:

  1. get_lesson_transcript(weekNumber=2) → pull the transcript
  2. Ask Claude "summarize this in 1-2 paragraphs, focused on what we actually built"
  3. admin_upsert_lesson(cohortSlug='cohort-1', weekNumber=2, transcriptSummary='…')

All inside Claude.ai, no platform-side code change needed to ship a summary.

Setup-guide block for Week 3 lesson body

Aaron — the existing block from #45 still works for student onboarding. For tonight's facilitator demo of writing a summary, the moves are:

## How to write a transcript summary (live demo)

1. In Claude.ai with LVB MCP connected, call:
   `get_lesson_transcript(weekNumber=2)`
2. Ask Claude: "Summarize this transcript in 2 paragraphs — what did we
   actually do, what landed for people, what's worth carrying forward."
3. Once you like it, ask Claude:
   `admin_upsert_lesson(cohortSlug='cohort-1', weekNumber=2,
                       transcriptSummary='<paste summary>')`
4. Verify with `get_lesson(weekNumber=2)``transcriptSummary` field
   should now contain your summary; `hasTranscriptSummary: true`.

Notice the architecture: students querying their lessons get the cheap
summary; you, as facilitator, can always reach for the verbatim
transcript on demand. Same MCP, two doors.

Test plan

  • npx tsc --noEmit clean (CI runs)
  • npm run db:migrate:local applies cleanly; transcript_summary column added
  • After remote migration + deploy — I'll smoke-test all four affected tools via my MCP session:
    • get_lesson(weekNumber=2) → returns summary (NULL initially), no transcriptMarkdown, hasTranscript: true
    • get_lesson_transcript(weekNumber=2) → returns full 96K-char transcript
    • admin_upsert_lesson(...transcriptSummary=…) → writes
    • get_lesson(weekNumber=2) again → summary now populated

Notes

🤖 Generated with Claude Code

… tool

For tonight's Week 3 / Connectors session: get_lesson now defaults to a
short admin-written transcript summary instead of the full ~30-100K-char
transcript markdown. The full transcript moves to a new dedicated tool,
get_lesson_transcript, that callers reach for explicitly when they need
verbatim quotes or specific moments.

This is the right architectural posture — student queries like "what did
we cover in week 2" hit a cheap response (~15K chars instead of 110K),
while "pull the verbatim transcript" remains available with one tool
call. Aaron writes summaries via admin_upsert_lesson by piping the
transcript through Claude during/before the session — itself a great
demonstration of the connector-as-collaborator workflow.

## Schema (migration 0022)

ALTER TABLE lessons ADD COLUMN transcript_summary text;

Schema-only addition. Existing rows stay NULL until summarized.

## get_lesson response shape

Drops `transcriptMarkdown` from the default. Adds:
- `transcriptSummary` — the short admin-written summary
- `hasTranscript` — boolean flag for the existence of the full version
- `hasTranscriptSummary` — boolean flag for the summary

The recordingUrl stays in the response (it's tiny). list_lessons gets
the same hasTranscriptSummary flag so Claude can chain confidently.

## get_lesson_transcript (new tool)

Args: weekNumber (required), cohortSlug (optional, defaults via the
existing resolveActiveCohortSlug). Returns the full transcriptMarkdown
+ recordingUrl. Description steers callers toward get_lesson for the
common case and reserves this tool for "I need verbatim."

## admin_upsert_lesson

Adds optional transcriptSummary input. Aaron's workflow:
  1. get_lesson_transcript(weekNumber=2) → pull the transcript
  2. Ask Claude "summarize this in 1-2 paragraphs"
  3. admin_upsert_lesson(cohortSlug, weekNumber=2, transcriptSummary='…')

All inside Claude.ai, no platform-side code change needed to ship a
summary for a week.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@unforced
unforced merged commit 90ff7d1 into main May 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant