@speakai/mcp-server 1.5.1 → 1.5.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 +11 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3604,6 +3604,14 @@ var analytics_exports = {};
3604
3604
  __export(analytics_exports, {
3605
3605
  register: () => register12
3606
3606
  });
3607
+ function withDefaultSearchDateRange(params) {
3608
+ const now = /* @__PURE__ */ new Date();
3609
+ return {
3610
+ ...params,
3611
+ startDate: params.startDate ?? `${now.getUTCFullYear()}-01-01T00:00:00.000Z`,
3612
+ endDate: params.endDate ?? now.toISOString()
3613
+ };
3614
+ }
3607
3615
  function register12(server, client) {
3608
3616
  const api = client ?? speakClient;
3609
3617
  server.tool(
@@ -3613,11 +3621,11 @@ function register12(server, client) {
3613
3621
  "Returns matching media with sentiment data, tags, and content excerpts.",
3614
3622
  "Use this to find specific topics, keywords, or themes across your entire library.",
3615
3623
  "For filtering by media type, folder, tags, or speakers, use the filterList parameter.",
3616
- "Results are scoped by date range \u2014 defaults to current month if not specified."
3624
+ "Results are scoped by date range \u2014 defaults to current year if not specified."
3617
3625
  ].join(" "),
3618
3626
  {
3619
3627
  query: import_zod12.z.string().min(1).describe("Search query \u2014 searches across transcripts, insights, and metadata"),
3620
- startDate: import_zod12.z.string().optional().describe("Start date for search range (ISO 8601). Defaults to start of current month."),
3628
+ startDate: import_zod12.z.string().optional().describe("Start date for search range (ISO 8601). Defaults to start of current year."),
3621
3629
  endDate: import_zod12.z.string().optional().describe("End date for search range (ISO 8601). Defaults to now."),
3622
3630
  filterList: import_zod12.z.array(
3623
3631
  import_zod12.z.object({
@@ -3637,7 +3645,7 @@ function register12(server, client) {
3637
3645
  },
3638
3646
  async (params) => {
3639
3647
  try {
3640
- const result = await api.post("/v1/analytics/search", params);
3648
+ const result = await api.post("/v1/analytics/search", withDefaultSearchDateRange(params));
3641
3649
  return {
3642
3650
  content: [{ type: "text", text: JSON.stringify(result.data, null, 2) }]
3643
3651
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speakai/mcp-server",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "mcpName": "io.github.speakai/mcp-server",
5
5
  "description": "Official Speak AI MCP Server — connect Claude and other AI assistants to Speak AI's transcription, insights, and media management API",
6
6
  "main": "dist/index.js",