{
 "documentation_revision": 10,
 "api_revision": 58,
 "source": "Endpoints.all + Learn.endpoints + McpTools",
 "operation": {
  "summary": "The newest image of a type; with since and wait, waits for the next one",
  "method": "GET",
  "auth": true,
  "mcp_tool": "image_last",
  "query": [
   {
    "name": "type",
    "description": "any (default), screenshot or photo",
    "type": "string",
    "required": false,
    "enum": [
     "any",
     "screenshot",
     "photo"
    ]
   },
   {
    "name": "since",
    "description": "ISO time or gallery id: only an image added after it",
    "type": "string",
    "required": false
   },
   {
    "name": "wait",
    "description": "With since: hold up to this many seconds (max 55) for a new image",
    "type": "integer",
    "required": false
   },
   {
    "name": "size",
    "description": "Preset: agent (1568 px, q85), thumb (512, q75), large (2560, q90), original",
    "type": "string",
    "required": false,
    "enum": [
     "agent",
     "thumb",
     "large",
     "original"
    ]
   },
   {
    "name": "max_edge_px",
    "description": "Long edge limit, 64-20000; overrides the preset",
    "type": "integer",
    "required": false
   },
   {
    "name": "max_width_px",
    "description": "Width limit, 64-20000",
    "type": "integer",
    "required": false
   },
   {
    "name": "quality",
    "description": "JPEG quality 40-100",
    "type": "integer",
    "required": false
   },
   {
    "name": "raw",
    "description": "1 = return the image bytes, details in X-Bridgit-* headers",
    "type": "integer",
    "required": false
   }
  ],
  "developer_only": false,
  "capture": false,
  "body": [],
  "example": "GET /v1/image/last?type=screenshot",
  "idempotent": false,
  "path": "/v1/image/last",
  "capability": "gallery",
  "returns": "id, type, taken_at, added_at, album, width_px, height_px, size_bytes, data_base64",
  "mcp_input_schema": {
   "type": "object",
   "properties": {
    "wait": {
     "description": "With since: hold up to this many seconds (max 55) for a new image",
     "type": "integer"
    },
    "max_edge_px": {
     "description": "Long edge limit, 64-20000; overrides the preset",
     "type": "integer"
    },
    "max_width_px": {
     "description": "Width limit, 64-20000",
     "type": "integer"
    },
    "size": {
     "description": "Preset: agent (1568 px, q85), thumb (512, q75), large (2560, q90), original",
     "type": "string",
     "enum": [
      "agent",
      "thumb",
      "large",
      "original"
     ]
    },
    "type": {
     "description": "any (default), screenshot or photo",
     "type": "string",
     "enum": [
      "any",
      "screenshot",
      "photo"
     ]
    },
    "since": {
     "description": "ISO time or gallery id: only an image added after it",
     "type": "string"
    },
    "quality": {
     "description": "JPEG quality 40-100",
     "type": "integer"
    }
   },
   "required": []
  },
  "errors": [
   "capability_disabled",
   "permission_denied",
   "photo_not_found",
   "too_many_waits"
  ],
  "requires": null
 }
}
