cover_letter_tool
Write a cover letter for a SPECIFIC job — TWO steps. STEP 1 (default; action omitted or 'prepare'): the server returns the job's JD and the candidate's background, plus writing instructions. YOU (the model) then WRITE the cover letter (250–350 words, specific to the role, mapping the candidate's real achievements to the JD — never fabricate). STEP 2: call this tool again with action:'save', cover_letter_text:, and job_id — the server renders a PDF and saves it to the candidate's Workopia dashboard (requires sign-in). Use whenever the user asks for a cover letter for a specific job. Resolving job_id (same rules as tailor_resume_tool / job_detail_tool): pass the Job Id value from the most recent prior search/refine result VERBATIM; no placeholders like 'JOB_1' or '#1'. For STEP 1 supply ONE of job_id (preferred — server fetches the JD from Mongo) OR job_description, plus the candidate's resume via resume_text / resume_content / json_resume / user_profile.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Omit or 'prepare' = STEP 1 (server returns JD + background + instructions for you to write). 'save' = STEP 2 (pass cover_letter_text; server renders a PDF and saves it to the dashboard; requires sign-in). | |
| job_id | No | ID of a job from a prior search/refine result. Use the **Job Id** value from the prior search result's content text VERBATIM. Server fetches full JD from Mongo. | |
| company | No | Optional; used in the confirmation line. | |
| job_title | No | Optional; used in the 'for <role> at <company>' confirmation line. | |
| parameters | No | ||
| session_id | No | ||
| user_email | No | If provided, server fetches the full Workopia profile for the cover letter header + writes the generated cover letter back to profile.applications[jobId].coverLetter. | |
| json_resume | No | Optional JSON Resume object (basics/work/skills). Takes precedence over resume_text when both present. | |
| resume_text | No | User's resume content (plain text or JSON Resume as string). | |
| cover_letter | No | Optional wrapper containing the same fields above (legacy shape). | |
| user_profile | No | Optional main-site profile object; used as a fallback source for summary/skills/experience and for the cover letter header (firstName, lastName, email, phone, city, country). | |
| resume_content | No | ||
| job_description | No | Full JD text when the user pastes it directly (alternative to job_id). | |
| cover_letter_text | No | STEP 2 only: the cover letter you wrote (plain text). The server renders it to PDF and stores it on profile.applications[job_id].coverLetter. |