Skip to main content
Glama

Rank technicians for a P0 emergency insert

listEmergencyCandidates

Rank technicians available for a P0 emergency job insertion, ordered by fastest arrival. Returns displacement previews to help select the best candidate.

Instructions

Rank technicians for a P0 emergency insert

Returns the technicians who could take the emergency job at the requested start, ranked FASTEST-ARRIVAL first (arrival beats route efficiency for a P0). The response also carries a historical crew_recommendation (median crew size on comparable completed jobs + mandatory disclaimer — AC-2). Booked technicians are still candidates — each entry carries the displacement preview (which lower-priority jobs would be pushed, per day) that committing to them would cause; total_moves=0 means a free slot. P0 jobs are never displaced; P1 only by a P0. ETA is estimated from the technician's start location (no live GPS). Feed the chosen technician_id into emergency/preview + emergency/commit. 409 NEXT STEPS: EMERGENCY_RESCHEDULE_NOT_ELIGIBLE — the job cannot be emergency-inserted (not P0, already started/completed/archived, or not quoted): fix the job state or use a normal confirm. EMERGENCY_RESCHEDULE_CREW_UNSUPPORTED — crew jobs cannot use the emergency flow (v1): staff via confirm/reassign instead. EMERGENCY_RESCHEDULE_MULTIDAY_UNSUPPORTED — a confirmed multi-day job cannot be re-inserted (v1): use the normal reassign flow. EMERGENCY_RESCHEDULE_NO_WORKING_DAY — the chosen date has no working hours: pick a working day. EMERGENCY_RESCHEDULE_IN_PAST — start time already passed: pick a future time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesCascade mode each candidate's displacement preview assumes: overtime = displaced jobs stay same-day; next_day = overflow rolls to the next working day.
limitNoMax candidates to return (default 5, max 10).
start_atYesDesired start — business-local naive datetime, no offset. Must be in the future.
idempotency_keyNoOptional idempotency key (forwarded as the Idempotency-Key header). Reuse the same value when retrying so the operation runs at most once.
emergency_job_idYesID of the P0 job to place.
Behavior4/5

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

Annotations are consistent (not readOnly, not destructive). Description adds behavioral details: ETA from start location, no live GPS, displacement preview, crew_recommendation, and error conditions. No contradictions.

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?

Well-structured with front-loaded purpose and ranking logic. Error codes are clearly listed. Slightly long but every sentence adds value; could be more concise.

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?

No output schema, but description thoroughly explains return values (ranked technicians, crew_recommendation, displacement preview, total_moves, ETA) and error handling (409 codes). Complete for a complex tool.

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

Parameters4/5

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

Schema covers all 5 parameters with descriptions (100% coverage). Description adds context for mode (cascade behavior) and start_at (business-local naive datetime), slightly exceeding schema info.

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?

The description clearly states the tool ranks technicians for a P0 emergency insert, sorted by fastest arrival. It differentiates from siblings like listCrewCandidates and listNearbyTechnicians by focusing on emergency dispatch with displacement previews.

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

Usage Guidelines5/5

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

Explicitly states when to use (P0 emergency), ranking logic, and what the response includes. Provides detailed 409 error codes with next steps and alternative flows (normal confirm, reassign) for unsupported cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/crisphive/crisphive-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server