@exactpdf/mcp 0.2.8 → 0.2.9
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/run.js +5 -3
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/run.js
CHANGED
|
@@ -781,7 +781,7 @@ server.registerTool('exactpdf_estimate_speech_cost', {
|
|
|
781
781
|
characters: z.number().int().positive().optional().describe('Known narration character count, if already extracted.'),
|
|
782
782
|
minutes: z.number().positive().optional().describe('Known generated minutes, if already estimated.'),
|
|
783
783
|
mode: z.enum(['speech', 'audiobook', 'presentation', 'translate']).optional().describe('Default: audiobook.'),
|
|
784
|
-
target_language: z.string().optional().describe('
|
|
784
|
+
target_language: z.string().optional().describe('Only set when mode is translate. Leave empty for English speech/audiobook/presentation estimates.'),
|
|
785
785
|
}),
|
|
786
786
|
}, async ({ path, characters, minutes, mode, target_language }) => {
|
|
787
787
|
let estimatedChars = characters ?? 0;
|
|
@@ -792,7 +792,7 @@ server.registerTool('exactpdf_estimate_speech_cost', {
|
|
|
792
792
|
estimatedChars = Math.max(1_000, Math.round(info.size / 8));
|
|
793
793
|
}
|
|
794
794
|
const estimatedMinutes = minutes ?? Math.max(1, Math.ceil(estimatedChars / 900));
|
|
795
|
-
const selectedMode =
|
|
795
|
+
const selectedMode = mode === 'translate' ? 'translate' : (mode ?? 'audiobook');
|
|
796
796
|
const creditsPerMinute = selectedMode === 'translate' ? 3 : 1;
|
|
797
797
|
const credits = Math.max(1, estimatedMinutes * creditsPerMinute);
|
|
798
798
|
return {
|
|
@@ -808,7 +808,9 @@ server.registerTool('exactpdf_estimate_speech_cost', {
|
|
|
808
808
|
generated_minutes: estimatedMinutes,
|
|
809
809
|
credits_per_minute: creditsPerMinute,
|
|
810
810
|
current_credit_cost: credits,
|
|
811
|
-
|
|
811
|
+
target_language_applied: selectedMode === 'translate' ? (target_language ?? null) : null,
|
|
812
|
+
ignored_target_language: selectedMode !== 'translate' && target_language ? target_language : null,
|
|
813
|
+
note: 'ExactPDF charges async speech jobs by estimated generated minutes: 1 credit/minute for standard speech/audiobook/presentation, 3 credits/minute for translate-and-speak. A target language only changes pricing when mode is translate. Path-based estimates are rough until the API extracts PDF text.',
|
|
812
814
|
},
|
|
813
815
|
}, null, 2),
|
|
814
816
|
},
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"name": "com.exactpdf/mcp",
|
|
4
4
|
"title": "ExactPDF",
|
|
5
5
|
"description": "Agent-facing PDF API: merge, split, rotate, compress, images, metadata, text, Markdown, voice previews, async speech/audiobook, multilingual speech, and presentation narration jobs.",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.9",
|
|
7
7
|
"websiteUrl": "https://exactpdf.com/docs/api",
|
|
8
8
|
"packages": [
|
|
9
9
|
{
|
|
10
10
|
"registryType": "npm",
|
|
11
11
|
"identifier": "@exactpdf/mcp",
|
|
12
|
-
"version": "0.2.
|
|
12
|
+
"version": "0.2.9",
|
|
13
13
|
"transport": {
|
|
14
14
|
"type": "stdio"
|
|
15
15
|
}
|