mcp-speechmatics-transcribe 0.1.6 → 0.1.7

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/README.md CHANGED
@@ -80,7 +80,8 @@ the adapter contains no transcription-specific schemas or execution logic.
80
80
 
81
81
  The read-only `token_status` tool checks all configured tokens through the EU1
82
82
  Batch usage endpoint. Optional `since` and `until` dates use YYYY-MM-DD; the default
83
- start is the first day of the current UTC month. Results identify each key by its
83
+ start is the first day of the current UTC month and the default end is today in UTC,
84
+ explicitly including the current day's usage. Results identify each key by its
84
85
  configured login or a masked token. Excluded keys return `excluded` without an API
85
86
  request. Successful requests return `active` and the API's usage fields directly;
86
87
  failures return `error` with available HTTP details. Short anonymous tokens are fully
@@ -3,8 +3,11 @@ import { loadConfig } from "./config.js";
3
3
  import { readLog } from "./history.js";
4
4
  import { ApiError, getUsage } from "./speechmatics.js";
5
5
 
6
- export async function tokenStatus({ since = new Date().toISOString().slice(0, 7) + "-01", until } = {}) {
7
- if (until && until < since) throw new Error("until must be on or after since.");
6
+ export async function tokenStatus({ since, until } = {}) {
7
+ const today = new Date().toISOString().slice(0, 10);
8
+ since ??= today.slice(0, 7) + "-01";
9
+ until ??= today;
10
+ if (until < since) throw new Error("until must be on or after since.");
8
11
  const { tokens } = await loadConfig();
9
12
  const excluded = new Set((await readLog())
10
13
  .filter((entry) => entry.tokenDisabled)
package/modules/tools.js CHANGED
@@ -40,7 +40,7 @@ export function createTools(configuredDefaults) {
40
40
  description: "Check configured tokens and read Batch usage from Speechmatics. Excluded tokens are reported without API requests. Identity is the configured login or a masked token. API access does not guarantee funds for transcription. Usage is returned in the API's scope, not attributed exclusively to a key. This read-only check does not change rotation, exclusions, or logs.",
41
41
  inputSchema: z.strictObject({
42
42
  since: z.iso.date().optional().describe("Inclusive start date YYYY-MM-DD. Defaults to the first day of the current UTC month."),
43
- until: z.iso.date().optional().describe("Inclusive end date YYYY-MM-DD. Omit to use the API's current end date."),
43
+ until: z.iso.date().optional().describe("Inclusive end date YYYY-MM-DD. Defaults explicitly to today in UTC, including the current day's usage."),
44
44
  }),
45
45
  annotations: { readOnlyHint: true },
46
46
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-speechmatics-transcribe",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Transcribe audio and video files with Speechmatics through a CLI and MCP server.",
5
5
  "type": "module",
6
6
  "license": "MIT",