Skip to main content
Glama
satovarb16
by satovarb16

analyze_job

Fetches your general resume, scoring guide, and work-authorization check so you can score how well a job matches before applying.

Instructions

Gather the general resume + scoring guide so Claude can score the match.

  1. Verifies a general resume exists (returns error envelope if not).

  2. Verifies work authorization has been declared at least once (returns error="no_work_authorization" if not — see design D7/module docstring for the precondition ordering decision).

  3. Returns the general resume, a scoring guide, an extracted echo of the caller's input, and a live work-authorization comparison.

The match score and APPLY/CONSIDER/SKIP recommendation are NOT computed by this tool — after calling it, score the candidate's resume against the job (already pasted into this conversation) and apply the scoring_guide's recommendation_rules in your reply.

The resume injected here is the GENERAL resume (design D6), not the most recently tailored one: scoring a job against a resume already tailored FOR that job would inflate the match score by scoring the resume against itself.

This tool NEVER raises for any documented failure mode — all such failures are encoded in the return envelope. An unexpected keyword argument (e.g. a JD text payload) is a caller programming error and raises normally, exactly as calling any Python function with an unknown keyword does.

Args: title: Job title, Claude-extracted from the pasted posting. company: Company name, Claude-extracted. country: Free-text country, Claude-extracted. Compared against the user's declared work authorization; a mismatch populates work_authorization with an advisory warning. url: The job posting URL, if any. Resolved to a job_id (exact match against the jobs table) so the general-resume selection can exclude a resume already tailored to this job. None when the user has no URL to give (e.g. a referral). custom_title: The user's handle for a URL-less job. Echoed back, AND — when url is absent — resolved to a job_id the same way url is, so Guard 1 (anti-self-scoring) stays armed for jobs saved without a url. If more than one saved job shares this custom_title, this tool refuses to guess and returns error="ambiguous_custom_title".

Returns: AnalyzeJobResult with extracted/resume/scoring_guide/ work_authorization populated on success, or error/message fields populated on failure ("no_resume" | "corrupt" | "ambiguous_custom_title" | "no_work_authorization").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
titleYes
companyYes
countryYes
custom_titleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
noticeNo
resumeNo
messageNo
extractedNo
scoring_guideNo
work_authorizationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed24 schema fields changedv0.3.1
    • addedInput schema / properties / company
      Added value: +{
      +  "title": "Company",
      +  "type": "string"
      +}
    • addedInput schema / properties / country
      Added value: +{
      +  "title": "Country",
      +  "type": "string"
      +}
    • addedInput schema / properties / custom_title
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Custom Title"
      +}
    • addedInput schema / properties / title
      Added value: +{
      +  "title": "Title",
      +  "type": "string"
      +}
    • addedInput schema / properties / url / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / url / default
      Added value: +null
    • removedInput schema / properties / url / type
      Removed value: -"string"
    • changedInput schema / required
      Previous value: -[
      -  "url"
      -]New value: +[
      +  "title",
      +  "company",
      +  "country"
      +]
    • removedOutput schema / $defs / EducationEntry
      Removed value: -{
      -  "description": "A single education entry extracted from a CV.",
      -  "properties": {
      -    "degree": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Degree"
      -    },
      -    "field": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Field"
      -    },
      -    "institution": {
      -      "title": "Institution",
      -      "type": "string"
      -    },
      -    "year": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Year"
      -    }
      -  },
      -  "required": [
      -    "institution"
      -  ],
      -  "title": "EducationEntry",
      -  "type": "object"
      -}
    • removedOutput schema / $defs / ExperienceEntry
      Removed value: -{
      -  "description": "A single work experience entry extracted from a CV.",
      -  "properties": {
      -    "company": {
      -      "title": "Company",
      -      "type": "string"
      -    },
      -    "description": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Description"
      -    },
      -    "duration_years": {
      -      "anyOf": [
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Duration Years"
      -    },
      -    "title": {
      -      "title": "Title",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "company",
      -    "title"
      -  ],
      -  "title": "ExperienceEntry",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / ExtractedFields
      Added value: +{
      +  "description": "Verbatim echo of analyze_job's Claude-extracted input (design D5).\n\nEvery parser that provided a floor of truth on these fields is deleted;\nthis echo is the ONLY visibility the user gets into a bad extraction. No\nnormalization or reformatting is applied here — that would defeat the\npurpose of showing exactly what was received.",
      +  "properties": {
      +    "company": {
      +      "title": "Company",
      +      "type": "string"
      +    },
      +    "country": {
      +      "title": "Country",
      +      "type": "string"
      +    },
      +    "custom_title": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Custom Title"
      +    },
      +    "title": {
      +      "title": "Title",
      +      "type": "string"
      +    },
      +    "url": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Url"
      +    }
      +  },
      +  "required": [
      +    "title",
      +    "company",
      +    "country"
      +  ],
      +  "title": "ExtractedFields",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / JobSummary
      Removed value: -{
      -  "properties": {
      -    "company": {
      -      "title": "Company",
      -      "type": "string"
      -    },
      -    "title": {
      -      "title": "Title",
      -      "type": "string"
      -    },
      -    "url": {
      -      "title": "Url",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "title",
      -    "company",
      -    "url"
      -  ],
      -  "title": "JobSummary",
      -  "type": "object"
      -}
    • removedOutput schema / $defs / ProfileData
      Removed value: -{
      -  "description": "Structured profile data extracted from a CV.\n\nPersonal fields (name, email, location) are stored as flat top-level fields\nrather than nested under a 'personal' object — this matches what Claude\nnaturally returns and simplifies downstream consumers like analyze_job.",
      -  "properties": {
      -    "education": {
      -      "default": [],
      -      "items": {
      -        "$ref": "#/$defs/EducationEntry"
      -      },
      -      "title": "Education",
      -      "type": "array"
      -    },
      -    "email": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Email"
      -    },
      -    "experience": {
      -      "default": [],
      -      "items": {
      -        "$ref": "#/$defs/ExperienceEntry"
      -      },
      -      "title": "Experience",
      -      "type": "array"
      -    },
      -    "languages": {
      -      "default": [],
      -      "items": {
      -        "type": "string"
      -      },
      -      "title": "Languages",
      -      "type": "array"
      -    },
      -    "location": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Location"
      -    },
      -    "name": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Name"
      -    },
      -    "skills": {
      -      "default": [],
      -      "items": {
      -        "type": "string"
      -      },
      -      "title": "Skills",
      -      "type": "array"
      -    },
      -    "summary": {
      -      "default": "",
      -      "title": "Summary",
      -      "type": "string"
      -    }
      -  },
      -  "title": "ProfileData",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / ResumeVersion
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "A single saved resume version. Content is raw text, stored verbatim.",
      +  "properties": {
      +    "content": {
      +      "title": "Content",
      +      "type": "string"
      +    },
      +    "created_at": {
      +      "title": "Created At",
      +      "type": "string"
      +    },
      +    "id": {
      +      "title": "Id",
      +      "type": "string"
      +    },
      +    "job_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Job Id"
      +    },
      +    "label": {
      +      "title": "Label",
      +      "type": "string"
      +    },
      +    "legacy_job_url": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Legacy Job Url"
      +    },
      +    "parent_id": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Parent Id"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "label",
      +    "content",
      +    "parent_id",
      +    "created_at"
      +  ],
      +  "title": "ResumeVersion",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / VisaSummary
      Removed value: -{
      -  "properties": {
      -    "approval_rate": {
      -      "title": "Approval Rate",
      -      "type": "number"
      -    },
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "default": null,
      -      "title": "Error"
      -    },
      -    "filings": {
      -      "title": "Filings",
      -      "type": "integer"
      -    },
      -    "verdict": {
      -      "title": "Verdict",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "verdict",
      -    "filings",
      -    "approval_rate"
      -  ],
      -  "title": "VisaSummary",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / WorkAuthorizationCheck
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Live comparison result embedded in AnalyzeJobResult.work_authorization.\n\nThree outcomes, deliberately distinguishable by `status` alone (D7):\n\"authorized\" (job's country is among the declared ones — no warning),\n\"warned\" (it is not — `warning` names both the job's country and the\ndeclared list, as the user wrote them), \"undetermined\" (the job's\ncountry could not be interpreted at all — never silently treated as\neither of the other two). The warning is always advisory: it never\nblocks the envelope.",
      +  "properties": {
      +    "status": {
      +      "title": "Status",
      +      "type": "string"
      +    },
      +    "warning": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Warning"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "title": "WorkAuthorizationCheck",
      +  "type": "object"
      +}
    • changedOutput schema / description
      Previous value: -"Decision-ready envelope of FACTS. Claude derives the score and verdict.\n\nOn success, job/visa/profile/scoring_guide are populated. The server does\nnot compute a match score or recommendation — those are left to Claude,\nwhich reasons over this envelope and the scoring_guide."New value: +"Decision-ready envelope of FACTS. Claude derives the score and verdict.\n\nOn success, extracted/resume/scoring_guide are populated. The server\ndoes not compute a match score or recommendation — those are left to\nClaude, which reasons over this envelope and the scoring_guide.\n\nNo `job` or `visa` field — both the deleted job-fetch and visa-check\nsteps are gone from this orchestrator entirely."
    • addedOutput schema / properties / extracted
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ExtractedFields"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • removedOutput schema / properties / job
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "$ref": "#/$defs/JobSummary"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Notice"
      +}
    • removedOutput schema / properties / profile
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "$ref": "#/$defs/ProfileData"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • addedOutput schema / properties / resume
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ResumeVersion"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • removedOutput schema / properties / visa
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "$ref": "#/$defs/VisaSummary"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • addedOutput schema / properties / work_authorization
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/WorkAuthorizationCheck"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observedv0.1.2

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full load and does so richly: it declares the tool never raises for documented failures (all encoded in the return envelope), names every failure mode, explains the ambiguous_custom_title refusal-to-guess behavior, and justifies the anti-self-scoring guard. This is exactly the behavioral context an agent cannot get from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and a numbered breakdown, and most sentences earn their place given the zero annotation and zero schema coverage. It is somewhat verbose with internal design references (D6/D7, module docstring) that add little for a calling agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, return values need not be explained, yet the description also covers the success/failure envelope shape. Combined with full parameter and behavioral coverage, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and it does: all five parameters are documented, including non-obvious semantics like country being compared against work authorization and url/custom_title both being resolved to a job_id to keep the anti-self-scoring guard armed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

It states a specific composite action (gather the general resume + scoring guide) and, crucially, disambiguates the name by declaring the actual scoring is NOT done here — the caller scores afterward. An agent can distinguish it from save_job_analysis or get_job purely from the text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly frames this as the first step and tells the caller what to do next ('after calling it, score the candidate's resume... apply the scoring_guide's recommendation_rules'). It also documents the precondition chain (resume must exist, work authorization must be declared). It does not explicitly name sibling tools or state when to prefer them, so it falls short of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.