Skip to content

Commit 6008f60

Browse files
committed
fix(pdf-server): Normalize arxiv URLs in read_pdf_bytes too
1 parent 35a7e6d commit 6008f60

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/pdf-server/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ export function createServer(): McpServer {
5555
},
5656
async (args: unknown): Promise<CallToolResult> => {
5757
if (!pdfIndex) throw new Error("Not initialized");
58-
const { url, offset, byteCount } = ReadPdfBytesInputSchema.parse(args);
58+
const { url: rawUrl, offset, byteCount } = ReadPdfBytesInputSchema.parse(args);
59+
const url = isArxivUrl(rawUrl) ? normalizeArxivUrl(rawUrl) : rawUrl;
5960
const entry = findEntryByUrl(pdfIndex, url);
6061
if (!entry) throw new Error(`PDF not found: ${url}`);
6162

0 commit comments

Comments
 (0)