whistler-mcp 1.0.4 → 1.0.6
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 +1 -0
- package/package.json +1 -1
- package/server.js +5 -1
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Whistler MCP Server
|
|
2
|
+
 
|
|
2
3
|
|
|
3
4
|
An official [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for interacting with the Whistler placement data platform. This allows AI assistants like Claude Desktop, Cursor, and others to seamlessly read job roles, platform statistics, and PDFs on your behalf.
|
|
4
5
|
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -217,7 +217,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
217
217
|
result = await invokeApi('/buy-bid', 'POST', params);
|
|
218
218
|
break;
|
|
219
219
|
case 'view_job_pdf': {
|
|
220
|
-
|
|
220
|
+
// pdfUrl from the backend is a relative path like /api/pdfs/secure/:id
|
|
221
|
+
// invokeApiBinary prepends API_BASE_URL which already ends in /api,
|
|
222
|
+
// so we must strip the leading /api prefix to avoid doubling it.
|
|
223
|
+
const normalizedPdfUrl = params.pdfUrl.replace(/^\/api/, '');
|
|
224
|
+
const arrayBuffer = await invokeApiBinary(normalizedPdfUrl);
|
|
221
225
|
const buffer = Buffer.from(arrayBuffer);
|
|
222
226
|
const pdfData = await pdfParse(buffer);
|
|
223
227
|
result = {
|