fellow-mcp 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +63 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -635,6 +635,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
635
635
|
case "get_meeting_summary": {
|
|
636
636
|
const { note_id, recording_id, meeting_title } = args;
|
|
637
637
|
let noteId = note_id;
|
|
638
|
+
let targetRecordingId = recording_id;
|
|
638
639
|
// If recording_id provided, get the associated note_id
|
|
639
640
|
if (!noteId && recording_id) {
|
|
640
641
|
const recordingsResp = await client.listRecordings({ page_size: 50 });
|
|
@@ -643,56 +644,87 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
643
644
|
noteId = recording.note_id;
|
|
644
645
|
}
|
|
645
646
|
}
|
|
646
|
-
// If meeting_title provided, search for the note
|
|
647
|
+
// If meeting_title provided, search for the note and recording
|
|
647
648
|
if (!noteId && meeting_title) {
|
|
648
|
-
|
|
649
|
+
// Search recordings by title to get both note_id and recording_id
|
|
650
|
+
const recordingsResp = await client.listRecordings({
|
|
649
651
|
title: meeting_title,
|
|
650
|
-
include_content: true,
|
|
651
652
|
page_size: 1,
|
|
652
653
|
});
|
|
653
|
-
if (
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
{
|
|
658
|
-
type: "text",
|
|
659
|
-
text: `# Meeting Summary: ${note.title}\n\nNote ID: ${note.id}\nEvent Start: ${note.event_start ?? "N/A"}\n\n${note.content_markdown ?? "No content available."}`,
|
|
660
|
-
},
|
|
661
|
-
],
|
|
662
|
-
};
|
|
654
|
+
if (recordingsResp.recordings.data.length > 0) {
|
|
655
|
+
const recording = recordingsResp.recordings.data[0];
|
|
656
|
+
noteId = recording.note_id;
|
|
657
|
+
targetRecordingId = recording.id;
|
|
663
658
|
}
|
|
664
659
|
}
|
|
665
|
-
if (!noteId) {
|
|
660
|
+
if (!noteId && !targetRecordingId) {
|
|
666
661
|
return {
|
|
667
662
|
content: [
|
|
668
663
|
{
|
|
669
664
|
type: "text",
|
|
670
|
-
text: "
|
|
665
|
+
text: "Meeting not found. Please provide a valid note_id, recording_id, or meeting_title.",
|
|
671
666
|
},
|
|
672
667
|
],
|
|
673
668
|
};
|
|
674
669
|
}
|
|
675
|
-
//
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
}
|
|
670
|
+
// Fetch note content
|
|
671
|
+
let noteContent = null;
|
|
672
|
+
let noteTitle = meeting_title ?? "Unknown Meeting";
|
|
673
|
+
let eventStart = null;
|
|
674
|
+
if (noteId) {
|
|
675
|
+
const notesResp = await client.listNotes({
|
|
676
|
+
include_content: true,
|
|
677
|
+
page_size: 50,
|
|
678
|
+
});
|
|
679
|
+
const note = notesResp.notes.data.find((n) => n.id === noteId);
|
|
680
|
+
if (note) {
|
|
681
|
+
noteTitle = note.title;
|
|
682
|
+
eventStart = note.event_start ?? null;
|
|
683
|
+
noteContent = note.content_markdown ?? null;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
// Find recording ID if we don't have it
|
|
687
|
+
if (!targetRecordingId && noteId) {
|
|
688
|
+
const recordingsResp = await client.listRecordings({ page_size: 50 });
|
|
689
|
+
const recording = recordingsResp.recordings.data.find((r) => r.note_id === noteId);
|
|
690
|
+
if (recording) {
|
|
691
|
+
targetRecordingId = recording.id;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
// Fetch transcript
|
|
695
|
+
let transcriptText = null;
|
|
696
|
+
if (targetRecordingId) {
|
|
697
|
+
const recordingsResp = await client.listRecordings({
|
|
698
|
+
include_transcript: true,
|
|
699
|
+
page_size: 50,
|
|
700
|
+
});
|
|
701
|
+
const recording = recordingsResp.recordings.data.find((r) => r.id === targetRecordingId);
|
|
702
|
+
if (recording?.transcript) {
|
|
703
|
+
transcriptText = formatTranscript(recording.transcript);
|
|
704
|
+
if (!noteTitle || noteTitle === "Unknown Meeting") {
|
|
705
|
+
noteTitle = recording.title;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
// Build response with both note and transcript
|
|
710
|
+
let response = `# Meeting Summary: ${noteTitle}\n\n`;
|
|
711
|
+
response += `Note ID: ${noteId ?? "N/A"}\n`;
|
|
712
|
+
response += `Recording ID: ${targetRecordingId ?? "N/A"}\n`;
|
|
713
|
+
response += `Event Start: ${eventStart ?? "N/A"}\n\n`;
|
|
714
|
+
if (noteContent) {
|
|
715
|
+
response += `## Notes\n\n${noteContent}\n\n`;
|
|
716
|
+
}
|
|
717
|
+
if (transcriptText) {
|
|
718
|
+
response += `## Transcript\n\n${transcriptText}`;
|
|
719
|
+
}
|
|
720
|
+
else if (!noteContent) {
|
|
721
|
+
response += "No notes or transcript available for this meeting.";
|
|
690
722
|
}
|
|
691
723
|
return {
|
|
692
724
|
content: [
|
|
693
725
|
{
|
|
694
726
|
type: "text",
|
|
695
|
-
text:
|
|
727
|
+
text: response,
|
|
696
728
|
},
|
|
697
729
|
],
|
|
698
730
|
};
|