u
This commit is contained in:
@@ -43,9 +43,7 @@ export function createPdfReadTool({ googleAuthId }) {
|
||||
return defineTool({
|
||||
name: 'pdf_read',
|
||||
description:
|
||||
'Read and convert PDF (or text) documents. ' +
|
||||
'Supports converting PDF to layout-preserved text ("txt") or rendering pages to PNG images ("png") ' +
|
||||
'stored in the VFS images/ folder for inspection with analyze_image or inline markdown embedding.',
|
||||
'Read and convert PDF/text documents to text or VFS PNG images (stored in "images/").',
|
||||
strict: false,
|
||||
parameters: {
|
||||
type: 'object',
|
||||
@@ -54,23 +52,20 @@ export function createPdfReadTool({ googleAuthId }) {
|
||||
properties: {
|
||||
path: {
|
||||
type: 'string',
|
||||
description: 'VFS path of the PDF or text file (e.g. "invoice.pdf", "docs/order.pdf"), or HTTP(S) URL.',
|
||||
description: 'VFS path or HTTP(S) URL.',
|
||||
},
|
||||
format: {
|
||||
type: 'string',
|
||||
enum: ['txt', 'png', 'both'],
|
||||
description:
|
||||
'Conversion format: "txt" extracts layout-preserved text, ' +
|
||||
'"png" renders pages into PNG images stored in the VFS images/ folder, ' +
|
||||
'"both" extracts text and renders PNG images. Default is "txt".',
|
||||
description: 'Output format: "txt" (layout text), "png" (page images), "both". Default "txt".',
|
||||
},
|
||||
page: {
|
||||
type: 'number',
|
||||
description: 'Specific page number (1-based) to extract text or render as image. If omitted, all pages are processed.',
|
||||
description: '1-based page number. Omit for all pages.',
|
||||
},
|
||||
dpi: {
|
||||
type: 'number',
|
||||
description: 'Resolution in DPI for PNG rendering. Default 150.',
|
||||
description: 'PNG render DPI. Default 150.',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user