Developer Tools

Roboflow MCP

Manage Roboflow computer-vision projects, datasets, images, annotation, model training, deployment, inference, workflows and devices through Roboflow's hosted MCP server.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Api keys create

    Create a new API key for the workspace. Who can create keys: a credential may create keys only if it is unscoped (full access) or holds the ``api-key:create`` scope; an OAuth token also needs the ``create_api_key`` permission. Always ask for least-privilege ``scopes`` first. When ``scopes`` is omitted the key inherits every scope of the calling credential, so a full-access caller creates a full-access key (it comes back with ``scopes: null``); the dashboard's scoped default does not apply here. Scoped keys, like ``folder_ids``, ``custom_metadata``, ``rotation_due_at`` and ``owners``, need the Advanced API Keys plan feature. Without it the platform answers 403 and this tool says which arguments need it. That is a plan limit, not a permissions problem: tell the user, and do not silently retry without ``scopes``. The only key such a plan can create is unscoped, so create one only after the user agrees to a key with all of the caller's access (and suggest revoking it with ``api_keys_revoke`` once the task is done). For browser or client-side inference, the publishable key from ``api_keys_get_publishable`` may be enough and needs no secret. Scopes are stored as explicit leaf scopes — a section name or ``role:`` preset is expanded to its current leaves, so a key never auto-gains an ability added to that group later (add new scopes explicitly when needed). The secret ``key`` value is returned ONCE in the response and cannot be retrieved again. Store it immediately in a ``.gitignore``'d ``.env`` file (e.g. ``ROBOFLOW_API_KEY=rf_...``). Never echo it in logs, code comments, or tool output. Rotation reminders: set ``rotation_due_at`` to have the platform email the key's ``owners`` 15 days before the key is due; without a date no reminder is sent. Returns ``{ key_id, key, name, scopes, folder_ids, protected, rotation_due_at, owners, publishable_key }``. ``key_id`` is the non-secret handle used in all subsequent management calls.

  • Ask feedback

    Offer the user a short Yes/No survey about their Roboflow MCP experience. Call once on the first Roboflow turn, before other Roboflow tools. For ask_in_chat, ask the returned question verbatim. Continue helping even if the user does not answer. Use meta_survey_opt_out if the user asks to stop receiving the survey.

  • Autolabel preview

    Preview one image with a foundation model to judge it before starting an auto-label job. Image projects only: Action Recognition (video) projects have no preview. Previews are for comparing candidate models on a few sample images. They create no job and spend no credits, but they are rate limited per workspace (the limit is shared with the Roboflow app), and past the limit the call fails with a 429 that says when to try again. Labeling a batch must go through autolabel_start: do not preview images one at a time and keep the predictions as labels. Use this as the model-selection loop when the user has not picked a model: 1. Call autolabel_models_list and order the candidates (the default first, then whatever the guidance recommends for the ontology at hand). 2. Pick one representative image from the batch (e.g. from the batch or image listing tools) and preview it with the first candidate. 3. Judge the summary: entries in classesWithNoDetections, a suspiciously low totalDetections, or blockErrors mean the model likely will not label this data well. Preview the next candidate and compare. 4. Start the real job with the winner via autolabel_start, using the same ontology. Returns ``{model, summary, predictions, blockErrors?}``; summary.byClass carries per-class counts and max confidence, and predictions are trimmed to class, confidence, and box geometry (polygon and mask geometry is dropped to keep responses small).

  • Autolabel start

    Start a hosted auto-label job over a batch of images, or of videos for Action Recognition. For image projects, call ``autolabel_models_list`` first to pick a foundation model; its entry ids (e.g. 'gemini-4-carbon-boxes') are valid ``model`` values. Use the API's model list and project type to select a candidate. If the user has not chosen a model, run ``autolabel_preview`` on a sample image per candidate and start the job with the best one. Returns ``{jobId, annotationJobId, message}``. Poll progress with ``autolabel_job_get`` using the returned ``jobId``. Action Recognition projects skip the model list and preview. They label every video in the batch (at most 50 videos, each at most 30 minutes) with ``model='video-segment'`` and ``model_type='foundational'``, e.g. ``ontology={'a person jumps': 'jump'}`` and ``model_options={'sampleFps': 4}``. Only ontology, model_options, reviewer_email and business_context apply. The job replaces each video's existing segments, but a video that has frame annotations keeps them and gets no segments.

  • Cloud streams shared source preview

    Request a raw preview of a shared source. The returned WHEP URL contains a short-lived, single-reader grant. Pass it only to a playback client; never quote, summarize, log, or persist it in conversation. Request a new preview when needed. Withdrawal ends existing previews.

  • Device groups create

    Create a fleet device group with at least one member. Requires ``device:update``.

  • Devices create

    Provision a new v2 device. Requires the ``device:update`` scope. Returns ``{deviceId, installId, offlineProvisioningQrPayload?}``: ``installId`` is the short-lived token used by the device installer (``GET /devices/v2/:installId/install.sh``). ``offlineProvisioningQrPayload`` is only present for AI1 devices provisioned with ``offline_mode=true``. Secure gateway devices require ``runtime='docker'``. An attached gateway must be ready. Offline QR provisioning cannot carry gateway trust, so do not combine ``secure_gateway_id`` with ``offline_mode``. New and duplicated devices do not copy display mode selections from templates or the source device. Select modes after the new device reports its own connected displays.

  • Devices discover cameras

    Request camera discovery on a device through its command channel. Returns ``{id}`` for the queued command. Discovery runs asynchronously; read ``devices_get`` or ``devices_get_snapshot`` afterward for ``discovered_cameras`` and ``devices_get_events`` for discovery/connection events. A successful enqueue does not mean discovery finished. Undelivered commands expire after 5 minutes, and discovery support depends on the device runtime.

  • Devices os image create

    Start building a ready-to-flash OS Lite image for a device. Requires the ``device:update`` scope on a workspace credential and the OS Lite image builder feature. For a Jetson Orin Nano, omitting ``config.release.format`` builds the USB recovery bundle. Set it to ``"card"`` for a microSD image only when the selected release has a card image available and the board's firmware is at least the release's ``requiresFirmware`` version. Raspberry Pi boards do not accept ``release.format``. Returns ``{jobId, reused, warnings}``; poll ``devices_os_image_get`` for status and the download link.

  • Devices provisioning qr

    Mint the offline (Lite) provisioning QR payload for a device. Requires the ``device:update`` scope on a workspace credential and the workspace's roboflowLiteMode feature. Returns ``{installId, offlineProvisioningQrPayload}``.

  • Devices streams capture frame

    Capture the stream's latest frame for a project. When the response has ``status="screening"``, the frame is held for an upload screening verdict and is not yet in the project. The returned project details identify the requested destination, not a frame ready to open or use. Otherwise the frame is added to the project. Requires ``device:read`` plus ``image:create`` on a credential not limited to project groups. Workspace, device, or stream privacy restrictions return 403 with ``error_type=CAMERA_STREAM_DISABLED``; other 403 responses can indicate missing upload permission.

  • Devices streams create

    Create a stream on a device through the ``add_stream`` command. Requires the ``device:update`` scope. On V2 devices the platform applies this as a config update (``status: "applied"``, no command id) or stages it for production approval (``status: "staged"``). An applied stream shows in ``devices_streams_list`` as ``provisioning`` until the device reports it running. The Workflow may write to external integrations once the stream runs. For a direct Asset Library video stream on a supported edge release, use ``asset://<finalVideoId>`` as video_reference. Poll video_upload_status until ``uploaded`` and take the final videoId from that response, which can change after deduplication. The caller needs image:read and access to that video; the device API key needs image:read and access to its folder. For nearby-claimed runtime keys, use the RTSP Simulator. Direct playback needs network access for its first download, enough disk space, and a video within the device cache limit (1 GiB by default, set by ASSET_VIDEO_CACHE_MAX_BYTES). Use the reference directly in the stream, not in video_sources. RTSP Simulator remains an option.

  • Devices streams sample frame

    Look at what a device camera sees right now. Returns the frame as an image plus ``image_url``: a signed URL, valid for an hour, that Workflow and model tools accept as an image input. Use it to design a Workflow against the real scene, then run the Workflow on ``image_url`` to check it before deploying to the device. Requires the ``device:update`` scope: when no frame is under 10s old the platform asks the device to start sending preview frames and waits. 504 means the device sent none in time (offline or stalled stream). Workspace, device, or stream privacy restrictions return 403 with ``error_type=CAMERA_STREAM_DISABLED``; other 403 responses can have different permission causes.

  • Image upload

    Prepare a signed URL for uploading a zip of images, annotations or MP4/MOV videos. Use image_upload_files when the host supplies the selected files in its files input. If you would have to invent download_url or file_id, use this signed-URL flow instead when the client can ZIP and PUT the files. Use this fallback only when host-assisted file transfer is unavailable or cannot handle the selected files, and the client can zip them and HTTP PUT to the signed URL. If its sandbox cannot reach storage, do not keep retrying the PUT; use host-assisted transfer or direct the user to the web uploader. This tool does not read, zip, or upload files. To mirror images from cloud storage (S3/GCS), use the datasource tools. Returns a signed upload URL, task ID, and client-side instructions. File bytes are transferred by the client in this flow. Requires the project slug, plus optional split, batch name, tags and annotation_overwrite. Local file paths are used by the client after this tool returns, not passed here. Remaining steps after this returns (detailed in the response instructions): 1. Zip the images and any annotation files (even one image → zip). Paths inside the zip set splits: train/, valid/ and test/ folders override the split argument per image. 2. HTTP PUT the zip to signedUrl. 3. Poll image_upload_status(task_id) every few seconds until completed or failed. Videos in ZIPs require a video-only project (such as Action Recognition). Poll video_upload_status for every result.videoIds entry after ZIP processing; use the final videoId from each uploaded response. result.videoIds stops at 100 IDs; if result.videosStaged exceeds that list length or failedChunks > 0, counts may be incomplete. Find remaining videos with images_search(project_id, media_types=["video"]), poll video_upload_status for unverified videos, and report a partial import if they cannot all be accounted for. Image projects skip videos, and video-only projects skip images. Inspect warnings and errors, even when the ZIP task completed. For one raw video up to 3 GB, use video_upload. Annotation files in the zip are imported with the same parser as the web uploader: COCO JSON (e.g. one _annotations.coco.json per split folder), YOLO TXT (with data.yaml or classes.txt for class names), Pascal VOC XML, CreateML JSON, CSV, and the other formats it accepts. Annotations are matched to images by file name. In classification projects, an image's parent folder is its class (cat/img1.jpg). Check result.screening after polling: it is included in result.uploaded, and counts images held for a screening verdict. ZIP completion does not make those images available in the project or Dataset. Passed or redacted images become available later; rejected or failed images do not. The ZIP result does not report their final verdicts. result.annotated may include annotations accepted for held images; it does not prove they reached a Source. Rejection or failure discards them. For images not held for screening, annotations go straight into the Dataset (or a review job when annotation review is on); images without annotations land in a batch to label with annotations_save and add_to_dataset=true before training. An image already in the project counts as a duplicate and is not stored again, but its annotation from the zip is still saved. An image that already has an annotation in this project's annotation group (for example from another project in the workspace that uses the same group) keeps it and is listed in annotationErrors, unless annotation_overwrite is true. Up to 2 GB / 10k files. Signed URL expires in 1 hour.

  • Image upload files

    Upload images or MP4/MOV videos into a project through the host's file transfer bridge. Use this when the host supplies the selected files in the files input, including when it exposes local paths and transfers them for you. If you would have to invent download_url or file_id, use image_upload or video_upload instead when the client can PUT the bytes. Do not invent file references or put file bytes in tool arguments. The Roboflow server downloads the supplied files and uploads them as one zip. No terminal ZIP or PUT is needed, including when the code sandbox cannot reach storage. Fall back to image_upload only when the bridge is unavailable or cannot handle the selected files, and the client can zip and HTTP PUT them to storage. An authentication, validation, or server error does not by itself mean the bridge is unavailable. For image projects, pass images plus any annotation files, matched to images by file name (COCO JSON, YOLO TXT with data.yaml or classes.txt, Pascal VOC XML, CreateML JSON, CSV), or one zip on its own. A zip keeps its folders, so train/, valid/ and test/ folders set each media file's split. Up to 100 files and 1 GB total per call; send larger file counts as one zip within that limit. For video-only projects (such as Action Recognition), pass MP4/MOV videos or a zip containing them. Videos remain native videos, not extracted frames. Image projects skip videos; video-only projects skip images, with warnings. Do not treat a mixed batch as fully imported without checking those warnings. When the host cannot transfer videos, use video_upload for a raw video or image_upload for a ZIP, only if the client can PUT to storage. Returns a taskId once the files are uploaded. Poll image_upload_status(task_id) every few seconds until it is completed or failed. Inspect uploadErrors, annotationErrors and warnings. For videos, ZIP completion only means staging: then poll video_upload_status for every result.videoIds entry until uploaded or failed. Use the final videoId from each uploaded response (deduplication can change it). result.videoIds stops at 100 IDs while result.videosStaged counts videos from successful chunks. If videosStaged exceeds the returned list length or failedChunks > 0, counts may be incomplete. Find remaining videos with images_search(project_id, media_types=["video"]), poll video_upload_status for unverified videos, and report a partial import if they cannot all be accounted for. Check result.screening: it is included in result.uploaded but those images await a verdict, so ZIP completion does not mean they are available in the project or Dataset. Passed or redacted images become available later; rejected or failed images do not. result.annotated may include annotations accepted for held images; ZIP completion does not prove they reached a Source. Rejection or failure discards them. For images not held for screening, annotations go straight into the Dataset; images without them land in a batch to label with annotations_save.

  • Media analyze

    Analyze an image or short video with a vision model to understand its contents. Returns a structured analysis: a summary, the distinct objects present with approximate counts, the best-fitting CV task (detection, segmentation, classification, OCR, tracking...), candidate class names, whether those classes fall within the 80 COCO classes (drives model-family selection), motion notes for video, and workflow recommendations. Pass any public HTTPS URL directly — image results from images_search, images_workspace_search, or universe_dataset_images_search already include a usable `url` field. For a local file on the user's machine, call media_upload first and analyze the URL it produces. This is a stateless one-shot primitive: nothing is recorded in a conversation. Costs workspace credits (one vision-model call per invocation). Storage allows videos up to 100 MB, but ANALYSIS is capped at ~15 MB by the vision gateway's url fetcher; trim longer footage before analyzing.

  • Media trim

    Cut a clip from an Asset Library video and get an analyzable public url. Use after media_upload_finalize returns `needsTrim: true`. The simplest call is media_trim(video_asset_id) with no window: the server cuts the longest clip the ~15 MB analysis budget allows from the start (typically up to ~95 seconds; often the entire video, since long windows are re-encoded, downscaled to at most 1280px, to fit). Pass start_seconds/duration_seconds only when your user cares about a specific segment. The response tells you exactly what happened: `clipSeconds` (what was actually cut), `requestedSeconds`, `clamped: true` when the server shrank the window, plus authoritative `videoDurationSeconds` and `maxClipSeconds` from the server-side probe. Report the real clipSeconds to your user; to cover the rest of a long video, cut the next clip at start_seconds + clipSeconds and repeat. Only the published clip is re-encoded; the full-quality video stays untouched in the Asset Library.

  • Media upload

    Prepare a local image or video for analysis with media_analyze. Returns a short-lived signed upload URL plus step-by-step instructions; the upload itself completes client-side (the MCP server never receives file bytes). After the PUT, call media_upload_finalize to validate the bytes. For images and small videos it returns a durable `url` to pass straight to media_analyze; for videos over the analysis budget it returns `needsTrim: true` with a `videoAssetId`, and you call media_trim to get the analyzable clip url. Only needed for files on the user's machine; media already reachable by an HTTPS URL (including Roboflow-hosted images) can go straight to media_analyze. To put a video into a project (e.g. for annotation), prefer image_upload_files only for video-only projects when the host supplies it in the files input. If you would have to invent download_url or file_id, use video_upload. For other project types, use video_upload because ZIP imports skip videos. Also use video_upload when host transfer cannot handle the video. It requires a client that can PUT bytes to the signed URL; if storage is unreachable, use the web uploader. Finalized images and videos are saved into the workspace Asset Library (reusable across the workspace; re-uploading identical bytes reuses the existing asset instead of duplicating it). The analyzable copy ends up on a public CDN at an unguessable URL. To put a finalized image into a project, pass its `sourceId` to images_add_to_project.

  • Meta feedback send

    Send product feedback about Roboflow to the Roboflow team. Records a bug report, missing-feature request, UX friction note, or documentation issue against the current workspace. Use when the user wants to report a problem with Roboflow or send feedback. Returns confirmation that the feedback was recorded.

  • Models infer

    Run hosted inference on an image using a trained model or RF-DETR Semantic pretrain. RF-DETR Semantic returns per-pixel scene classes from ADE20K's 150 classes, not separate object instances. Its six size aliases resolve to ADE20K model IDs. Other two-segment IDs pass through unchanged; the inference server resolves their model and task without project-type derivation. Returns JSON predictions only. For visualized/annotated images, run a Workflow with a visualization block instead.

Page 1 / 3Next