Skip to main content

resq_mcp.core.models

Shared domain models for the ResQ MCP server. These Pydantic models define the core data contracts shared across all subsystems.

annotations

UTC

datetime

Literal

BaseModel

Coordinates Objects

class Coordinates(BaseModel)
Geographic coordinates with status indicator. Represents a geographic point in decimal degrees (WGS84 datum) with an associated status flag for monitoring. Attributes:
  • lat - Latitude in decimal degrees (-90 to +90).
  • lng - Longitude in decimal degrees (-180 to +180).
  • status - Current status indicator (e.g., “clear”, “critical”).
Example:
coords = Coordinates(lat=37.3417, lng=-121.9751, status=“clear”) print(f”Position: {coords.lat}, {coords.lng}“)

lat

lng

status

Sector Objects

class Sector(BaseModel)
A monitored geographic sector in the drone surveillance network. Sectors are predefined geographic zones monitored by the drone fleet for disaster detection and response coordination. Attributes:
  • id - Unique sector identifier (e.g., “Sector-1”).
  • coordinates - Center point coordinates with status.

id

coordinates

DetectedObject Objects

class DetectedObject(BaseModel)
An object detected by drone sensors during surveillance. Represents the output of edge AI object detection running on drone hardware or ground processing stations. Attributes:
  • name - Human-readable name of detected object (default: “None”).
  • type - Classification type (e.g., “fire”, “vehicle”, “person”).
  • confidence - Detection confidence score (0.0 to 1.0).
  • description - Detailed description of the detection.

name

type

confidence

description

DisasterScenario Objects

class DisasterScenario(BaseModel)
A disaster scenario template for simulation and detection. Defines the characteristics of a disaster type that can be detected by drone surveillance or used as input for digital twin simulations. Attributes:
  • type - Disaster category (e.g., “wildfire”, “flood”, “earthquake”).
  • name - Human-readable scenario name.
  • confidence - Detection confidence or scenario likelihood (0.0 to 1.0).
  • description - Detailed scenario description including characteristics.

type

name

confidence

description

ErrorResponse Objects

class ErrorResponse(BaseModel)
Standard error response for failed operations. Used across all subsystems to provide consistent error messaging. Returned instead of raising exceptions for expected error conditions (e.g., invalid sector ID, missing data). Attributes:
  • status - Always “error” to distinguish from success responses.
  • message - Human-readable error description.
Example:
error = ErrorResponse(message=“Sector not found”) if isinstance(result, ErrorResponse): … print(f”Error: {result.message}“)

status

message