MCPDocumentation
On this page

Operations: planning, absences and cover

Cover candidates

ops_cover_candidates
Read
Permission required
ops.substitutions.view

When to use it

Who can cover a class, best first, with the panel's ranking: availability, qualification, already at the centre, gaps, rest, weekly load and cap; includes chains (B moves to the class and C takes B's) and who cannot and why. If the class is not pending, the candidates are indicative (hypothetical).

Input

FieldTypeDescription
request_idintegerCover request (from ops_uncovered / ops_overview)
occurrence_idstringOr the class: sessionId@YYYY-MM-DD (from ops_schedule / ops_find_session)
include_chainsboolean
limitinteger
organization_idintegerOptional: can only be the key's organization

Every tool also accepts lang (es | en) for the language of the text answer.

Output

FieldTypeDescription
request_idRequirednumber | null
hypotheticalRequiredbooleantrue = the class is not pending: indicative candidates, cannot be assigned
statusRequiredstringRequest status (or class status if hypothetical)
classRequiredobject
class.occurrence_idRequiredstring
class.session_idRequirednumber
class.dateRequiredstring
class.startRequiredstring | null
class.endRequiredstring | null
class.activityRequiredstring | null
class.spaceRequiredstring | null
class.missing_worker_idRequirednumber | null
class.missing_workerRequiredstring | null
covered_byRequiredstring | null
optionsRequiredobject[]Options best first: the same list and order as the panel
options[].rankRequirednumber1 = recommended (same position as in the panel)
options[].recommendedRequiredboolean
options[].kindRequired"direct" | "chain"direct: 1 move; chain: the person leaves their class and another covers it
options[].scoreRequirednumberEngine score (lower = better)
options[].worker_idRequirednumber
options[].workerRequiredstring
options[].whyRequiredstringWhy (as the panel explains it)
options[].penaltiesRequiredstringScore breakdown
options[].chainRequiredobject | nullChain: who takes the class worker leaves (pass it to ops_cover_assign_preview)
options[].flagsRequiredobject
options[].breakdownRequiredobject
total_optionsRequirednumber
blockedRequiredobject[]Who cannot and why
blocked[].worker_idRequirednumber
blocked[].workerRequiredstring
blocked[].codesRequiredstring[]
blocked[].why_notRequiredstring

Examples

Example 1: Candidates for an uncovered class

Call

JSON
{
  "name": "ops_cover_candidates",
  "arguments": {
    "request_id": 812
  }
}

Equivalent JSON-RPC call (POST /mcp)

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ops_cover_candidates",
    "arguments": {
      "request_id": 812
    }
  }
}