@modelcontextprotocol/server-pdf 1.0.1 → 1.1.1
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 +4 -1
- package/dist/index.js +0 -2
- package/dist/mcp-app.html +93 -48
- package/dist/server.d.ts +35 -7
- package/dist/server.js +172 -67
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -63,7 +63,10 @@ On some host platforms, tool calls have size limits, so large PDFs cannot be sen
|
|
|
63
63
|
```typescript
|
|
64
64
|
// Load in chunks with progress
|
|
65
65
|
while (hasMore) {
|
|
66
|
-
const chunk = await app.callServerTool(
|
|
66
|
+
const chunk = await app.callServerTool({
|
|
67
|
+
name: "read_pdf_bytes",
|
|
68
|
+
arguments: { url, offset },
|
|
69
|
+
});
|
|
67
70
|
chunks.push(base64ToBytes(chunk.bytes));
|
|
68
71
|
offset += chunk.byteCount;
|
|
69
72
|
hasMore = chunk.hasMore;
|
package/dist/index.js
CHANGED
|
@@ -34131,7 +34131,6 @@ import {
|
|
|
34131
34131
|
pathToFileUrl,
|
|
34132
34132
|
fileUrlToPath,
|
|
34133
34133
|
allowedLocalFiles,
|
|
34134
|
-
allowedRemoteOrigins,
|
|
34135
34134
|
DEFAULT_PDF
|
|
34136
34135
|
} from "./server.js";
|
|
34137
34136
|
async function startStreamableHTTPServer(createServer2) {
|
|
@@ -34212,7 +34211,6 @@ async function main() {
|
|
|
34212
34211
|
}
|
|
34213
34212
|
}
|
|
34214
34213
|
console.error(`[pdf-server] Ready (${urls.length} URL(s) configured)`);
|
|
34215
|
-
console.error(`[pdf-server] Allowed origins: ${[...allowedRemoteOrigins].join(", ")}`);
|
|
34216
34214
|
if (stdio) {
|
|
34217
34215
|
await startStdioServer(createServer);
|
|
34218
34216
|
} else {
|