upload-job-file
Upload and parse job description files (PDF, DOCX) to extract structured job data for AI-powered recruitment and job matching workflows.
Instructions
Upload and parse a job description file. Accepts base64-encoded file content. Returns parsed job data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileBase64 | Yes | Base64-encoded file content (PDF, DOCX, etc.) | |
| filename | Yes | Original filename with extension | |
| contentType | No | MIME type |
Implementation Reference
- src/tools/upload.ts:29-50 (handler)The handler and schema for 'upload-job-file' are registered together in this block. The handler logic uses the `client.upload.jobFile` method.
server.tool( "upload-job-file", "Upload and parse a job description file. Accepts base64-encoded file content. Returns parsed job data.", { fileBase64: z.string().describe("Base64-encoded file content (PDF, DOCX, etc.)"), filename: z.string().describe("Original filename with extension"), contentType: z.string().optional().describe("MIME type"), }, async (params) => { try { const buffer = Buffer.from(params.fileBase64, "base64"); const result = await client.upload.jobFile(buffer, { filename: params.filename, contentType: params.contentType, }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text", text: `Error: ${message}` }], isError: true }; } }, );