@speakai/mcp-server 1.39.0 → 1.39.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.
Files changed (2) hide show
  1. package/dist/index.js +19 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4824,7 +4824,8 @@ var media_exports = {};
4824
4824
  __export(media_exports, {
4825
4825
  LIST_MEDIA_DEFAULT_PAGE_SIZE: () => LIST_MEDIA_DEFAULT_PAGE_SIZE,
4826
4826
  LIST_MEDIA_MAX_PAGE_SIZE: () => LIST_MEDIA_MAX_PAGE_SIZE,
4827
- register: () => register
4827
+ register: () => register,
4828
+ toNameFilter: () => toNameFilter
4828
4829
  });
4829
4830
  function register(server, client) {
4830
4831
  const api = client ?? speakClient;
@@ -4919,7 +4920,7 @@ function register(server, client) {
4919
4920
  ),
4920
4921
  sortBy: import_zod2.z.string().optional().describe('Sort field and direction, e.g. "createdAt:desc" or "name:asc"'),
4921
4922
  filterMedia: import_zod2.z.number().int().optional().describe("Filter: 0=Uploaded, 1=Assigned, 2=Both (default: 2)"),
4922
- filterName: import_zod2.z.string().optional().describe("Filter media by partial name match"),
4923
+ filterName: import_zod2.z.string().optional().describe("Filter media by partial name match. Searches names only; use search_media to search transcripts."),
4923
4924
  folderId: import_zod2.z.string().optional().describe("Filter media within a specific folder"),
4924
4925
  from: import_zod2.z.string().optional().describe("Start date for date range filter (ISO 8601)"),
4925
4926
  to: import_zod2.z.string().optional().describe("End date for date range filter (ISO 8601)"),
@@ -4947,6 +4948,9 @@ function register(server, client) {
4947
4948
  async ({ include, ...params }) => {
4948
4949
  try {
4949
4950
  const queryParams = { ...params };
4951
+ if (params.filterName) {
4952
+ queryParams.filterName = toNameFilter(params.filterName);
4953
+ }
4950
4954
  if (include?.length) {
4951
4955
  queryParams.requestTypes = include.join(",");
4952
4956
  }
@@ -5499,7 +5503,7 @@ function register(server, client) {
5499
5503
  }
5500
5504
  );
5501
5505
  }
5502
- var import_zod2, LIST_MEDIA_DEFAULT_PAGE_SIZE, LIST_MEDIA_MAX_PAGE_SIZE, THUMBNAIL_MAX_BYTES, THUMBNAIL_POLL_TIMEOUT_MS, THUMBNAIL_POLL_INTERVAL_MS, THUMBNAIL_FILE_EXTENSIONS;
5506
+ var import_zod2, LIST_MEDIA_DEFAULT_PAGE_SIZE, LIST_MEDIA_MAX_PAGE_SIZE, THUMBNAIL_MAX_BYTES, THUMBNAIL_POLL_TIMEOUT_MS, THUMBNAIL_POLL_INTERVAL_MS, THUMBNAIL_FILE_EXTENSIONS, toNameFilter;
5503
5507
  var init_media3 = __esm({
5504
5508
  "src/tools/media.ts"() {
5505
5509
  "use strict";
@@ -5518,6 +5522,7 @@ var init_media3 = __esm({
5518
5522
  "image/png": "png",
5519
5523
  "image/webp": "webp"
5520
5524
  };
5525
+ toNameFilter = (text) => /^name:/i.test(text) ? text : `name:${text}`;
5521
5526
  }
5522
5527
  });
5523
5528
 
@@ -6822,13 +6827,15 @@ function register7(server, client) {
6822
6827
  content: [{ type: "text", text: `Error: ${message}` }],
6823
6828
  isError: true
6824
6829
  });
6825
- const withAnalysisOutcome = async (payload, messageId) => {
6826
- if (!messageId) return payload;
6830
+ const withAnalysisOutcome = async (payload, promptId, messageId) => {
6831
+ if (!promptId || !messageId) return payload;
6827
6832
  try {
6828
- const res = await api.get("/v1/prompt/messages", { params: { messageId } });
6829
- const messages = res.data?.data?.messages ?? res.data?.data ?? [];
6830
- const list = Array.isArray(messages) ? messages : [];
6831
- const match = list.find((m) => m?.messageId === messageId) ?? list[0];
6833
+ const res = await api.get("/v1/prompt/messages", { params: { promptId } });
6834
+ const history = res.data?.data?.history;
6835
+ const list = Array.isArray(history) ? history.flatMap(
6836
+ (conversation) => Array.isArray(conversation?.messages) ? conversation.messages : []
6837
+ ) : [];
6838
+ const match = list.find((m) => m?.messageId === messageId);
6832
6839
  const analysis = match?.analysis;
6833
6840
  if (!analysis) return payload;
6834
6841
  const downgraded = analysis.requested && analysis.used && analysis.requested !== analysis.used;
@@ -6860,7 +6867,7 @@ function register7(server, client) {
6860
6867
  }
6861
6868
  try {
6862
6869
  const result = analysisInput ? await api.post("/v1/prompt", params, { timeout: ANALYSIS_TIMEOUT_MS }) : await api.post("/v1/prompt", params);
6863
- const payload = analysisInput ? await withAnalysisOutcome(result.data, result.data?.data?.messageId) : result.data;
6870
+ const payload = analysisInput ? await withAnalysisOutcome(result.data, result.data?.data?.promptId, result.data?.data?.messageId) : result.data;
6864
6871
  return {
6865
6872
  content: [{ type: "text", text: JSON.stringify(payload, null, 2) }]
6866
6873
  };
@@ -13759,7 +13766,7 @@ function createCli() {
13759
13766
  };
13760
13767
  if (opts.type) params.mediaType = opts.type;
13761
13768
  if (opts.folder) params.folderId = opts.folder;
13762
- if (opts.name) params.filterName = opts.name;
13769
+ if (opts.name) params.filterName = toNameFilter(opts.name);
13763
13770
  if (opts.from) params.from = opts.from;
13764
13771
  if (opts.to) params.to = opts.to;
13765
13772
  if (opts.favorites) params.isFavorites = true;
@@ -14555,6 +14562,7 @@ var init_cli = __esm({
14555
14562
  init_config();
14556
14563
  init_format();
14557
14564
  init_media_utils();
14565
+ init_media3();
14558
14566
  }
14559
14567
  });
14560
14568
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakai/mcp-server",
3
- "version": "1.39.0",
3
+ "version": "1.39.2",
4
4
  "mcpName": "io.github.speakai/mcp-server",
5
5
  "description": "Official Speak AI MCP Server — capture meetings, search thousands of recordings, run async voice and video surveys, create clips, and automate workflows from your AI assistant.",
6
6
  "homepage": "https://docs.speakai.co/mcp",