We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70d360e commit 7835283Copy full SHA for 7835283
1 file changed
examples/pdf-server/src/mcp-app.ts
@@ -13,6 +13,9 @@ import { TextLayer } from "pdfjs-dist";
13
import "./global.css";
14
import "./mcp-app.css";
15
16
+// const MAX_MODEL_CONTEXT_LENGTH = 5000;
17
+const MAX_MODEL_CONTEXT_LENGTH = 1500;
18
+
19
// Configure PDF.js worker
20
pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
21
"pdfjs-dist/build/pdf.worker.mjs",
@@ -273,7 +276,7 @@ async function updatePageContext() {
273
276
}
274
277
275
278
// Format content with selection and truncation
- const content = formatPageContent(pageText, 5000, selection);
279
+ const content = formatPageContent(pageText, MAX_MODEL_CONTEXT_LENGTH, selection);
280
281
const markdown = `---
282
title: ${pdfTitle || ""}
0 commit comments