delete_job
Permanently remove a wrongly entered, duplicate, or test job record by ID or URL. Unlinks resume versions instead of deleting them, then returns a receipt confirming exactly what was removed.
Instructions
Permanently delete a stored job record, by id or url.
For a record that should never have existed: a mistyped entry, a posting
that turned out to be a duplicate, test data. This is NOT the same thing
as the withdrawn status, which says "I pulled out of this process" —
a real event worth keeping. Conflating the two poisons every later query,
because a withdrawn job still counts as a job you looked at.
Lookup is by id or url ONLY — deliberately not custom_title, which
get_job does accept. custom_title is not unique (save_job_analysis never
matches on it), and deleting by an ambiguous key is precisely how the
wrong record gets destroyed. Ambiguity is survivable on a read; here it
is not.
What happens to everything pointing at the job:
job_descriptionsrow: deleted. The captured posting belongs to the job and has no meaning without it.resume_versions: NOT deleted —job_idis set to NULL. The tree is append-only and stays that way: a tailored resume is a document you really sent, and it survives the posting it was aimed at. Only the pointer dies, which is why the append-only UPDATE trigger guards every column EXCEPT job_id.
There is no confirmation flag and no undo. The returned receipt names the job and every resume version that was unlinked, so the caller can report exactly what disappeared — with no delete_job there is no way back, the receipt is the safety mechanism.
This tool NEVER raises.
Args: id: Job id (preferred — always resolvable, unlike url). url: Alternate lookup key when id is not known.
Returns: DeleteJobResult with success=True and the receipt on success; success=False with error="invalid_input" (neither key given), "not_found", "corrupt", or "write_error".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| url | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| url | No | ||
| error | No | ||
| title | No | ||
| company | No | ||
| message | No | ||
| success | Yes | ||
| deleted_description | No | ||
| unlinked_resume_versions | No |