count_jobs_in_frame

Count published jobs in the person's frame

All MCP toolsRead

Start with this (with get_candidate_profile) to see how the person's SAVED desired conditions meet the market: derives the five-axis frame (occupations ∩ locations ∩ salary ∩ office frequency ∩ employment type) from the saved profile and counts published postings within it — total, per-currency salary breakdown, and how many arrived in the last 7 days. The derived frame rides the answer: its occupations are the saved references' ids (occupations are counted by id), an empty occupation list means no occupation condition, and its employmentTypes carry the saved desired employment types in the condition spelling (every type = [] = no condition; a proper subset drops postings whose employment type is undisclosed). Save conditions first with save_conditions, then re-count to see the effect. Counting as the person themselves covers the whole market (every employer's published postings); counting with an organization's credential covers only THAT organization's postings. A count only — list the matching postings themselves, newest first, with list_jobs_in_frame.

Input schema

{
  "type": "object",
  "properties": {
    "personId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "The person whose saved conditions to count for (persons.id)."
    }
  },
  "required": [
    "personId"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

{
  "type": "object",
  "properties": {
    "personId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "frame": {
      "type": "object",
      "properties": {
        "occupations": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "description": "Occupation numbers of the desired occupations. Empty = no occupation condition."
        },
        "locations": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$",
                "description": "ISO 3166-1 alpha-2 country code: exactly two uppercase letters, e.g. \"JP\". Three-letter codes (\"JPN\"), subdivision codes (\"JP-13\"), country names, and lowercase are rejected."
              },
              {
                "type": "string",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
                "description": "ISO 3166-2 subdivision code: two uppercase letters, a hyphen, then 1-3 uppercase alphanumerics, e.g. \"JP-13\" (Tokyo). Country-only codes (\"JP\"), place names, and lowercase are rejected."
              }
            ],
            "description": "Desired-location entry: a whole country as an ISO 3166-1 alpha-2 code (e.g. \"US\") or one region as an ISO 3166-2 subdivision code (e.g. \"JP-13\"). Names, lowercase, and three-letter codes are rejected."
          },
          "description": "Desired work locations, country and/or region codes. Empty = no location condition."
        },
        "salaryRows": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$",
                "description": "ISO 4217 currency code (exactly three uppercase letters). Required — no default."
              },
              "min": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "Desired annual lower bound in raw currency units (non-negative integer). Required — a row without a lower bound does not exist in the contract."
              },
              "max": {
                "description": "Optional annual upper bound in raw currency units; the posting↔row match never reads it, while the shared internal candidate facet fold reads it as the row's upper bound. Must be >= min when present.",
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "unit": {
                "default": "YEAR",
                "description": "Salary period unit; rows are always annual (\"YEAR\").",
                "type": "string",
                "const": "YEAR"
              }
            },
            "required": [
              "currency",
              "min",
              "unit"
            ],
            "additionalProperties": false,
            "description": "One per-currency desired-salary lower-bound row (annual): matching is strict against postings in this row's currency only — never converted, never compared across currencies."
          },
          "description": "Per-currency annual lower-bound rows (the RESOLVED spelling). Empty = no salary condition."
        },
        "officeModes": {
          "type": "object",
          "properties": {
            "none": {
              "type": "boolean",
              "description": "Postings with remote = \"none\" are within the frame."
            },
            "hybrid": {
              "type": "boolean",
              "description": "Postings with remote = \"hybrid\" are within the frame."
            },
            "full": {
              "type": "boolean",
              "description": "Postings with remote = \"full\" are within the frame."
            }
          },
          "required": [
            "none",
            "hybrid",
            "full"
          ],
          "additionalProperties": false,
          "description": "The office-frequency mode mapping as one boolean per posting remote mode (officeFrequencyRemoteModes). All true = no work-style condition. A posting whose remote is ABSENT (undisclosed) is ALWAYS within the frame regardless of these booleans."
        },
        "employmentTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "FULL_TIME",
              "PART_TIME",
              "CONTRACTOR",
              "TEMPORARY",
              "INTERN"
            ],
            "description": "Employment type (schema.org vocabulary): \"FULL_TIME\", \"PART_TIME\", \"CONTRACTOR\", \"TEMPORARY\", or \"INTERN\". Other values are rejected."
          },
          "description": "Employment-type condition in the CONDITION spelling: empty = no employment condition — also the spelling of every type (`employmentTypesCondition`). A posting with an UNDISCLOSED employmentType is within the frame only under the empty spelling."
        }
      },
      "required": [
        "occupations",
        "locations",
        "salaryRows",
        "officeModes",
        "employmentTypes"
      ],
      "additionalProperties": false,
      "description": "Job frame: the five-axis count predicate input — occupations ∩ locations ∩ salary ∩ office frequency ∩ employment type. Always complete: \"no condition\" is an empty array / all-true booleans, never a missing key."
    },
    "count": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "Published postings within the frame."
        },
        "byCurrency": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$",
                "description": "ISO 4217 currency code of the postings counted (baseSalary.currency)."
              },
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "In-frame postings carrying this currency."
              },
              "applied": {
                "type": "string",
                "enum": [
                  "matched",
                  "no_row"
                ],
                "description": "Whether the frame has a salary row for this currency: \"matched\" = the count was gated by that row; \"no_row\" = no salary condition for this currency (16§6-3). A per-currency fact, not per-posting."
              },
              "bandSatisfied": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991,
                "description": "In-frame postings of this currency that EXPLICITLY satisfy the desired salary band: baseSalary present, currency matches the frame row, and the annualized amount (COALESCE(max, min) × 12 when MONTH) ≥ the row's min. Stricter than `count` on purpose — undisclosed salary and HOUR-unit postings stay in `count` (never excluded from the frame) but never in `bandSatisfied`. A \"no_row\" currency is always 0."
              }
            },
            "required": [
              "currency",
              "count",
              "applied",
              "bandSatisfied"
            ],
            "additionalProperties": false
          },
          "description": "In-frame postings by baseSalary.currency, count descending then currency code ascending. Postings without a disclosed currency are in `total` only — no bucket (honest about the currency not existing)."
        },
        "newLast7Days": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991,
          "description": "In-frame postings published within the last 7 days — a fixed short window, independent of any report period selector (labeling is the UI's job)."
        }
      },
      "required": [
        "total",
        "byCurrency",
        "newLast7Days"
      ],
      "additionalProperties": false,
      "description": "The frame count: total + per-currency breakdown + the fixed 7-day new-posting window, all computed by ONE SQL aggregation over the same frame predicates."
    }
  },
  "required": [
    "personId",
    "frame",
    "count"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}

On this page