> ## Documentation Index
> Fetch the complete documentation index at: https://docs.labelbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test an MCP server connection and list its tools

> Opens a live connection to an MCP server using exactly the credential resolution a session would use, and returns the tools it advertises. A server that cannot be reached or authenticated is still HTTP 200 with ok=false, so inspect that field rather than relying on the status code. Pass vault_ids to probe authenticated; omit them to probe anonymously.



## OpenAPI

````yaml /managed-agents/openapi.yaml post /managed-agents/v1/mcp/probe
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.13.0
  description: >-
    The Recursion Managed Agents REST API. Authenticate with a Recursion API key
    as a bearer token. An organization-scoped key acts in its own organization
    and needs nothing else; a tenant-scoped key must also send
    `x-organization-id` with an organization id or `default`. Field names follow
    each operation's published schema.
servers:
  - url: https://api.recursion.labelbox.com
security:
  - bearerAuth: []
paths:
  /managed-agents/v1/mcp/probe:
    post:
      tags:
        - Vaults
      summary: Test an MCP server connection and list its tools
      description: >-
        Opens a live connection to an MCP server using exactly the credential
        resolution a session would use, and returns the tools it advertises. A
        server that cannot be reached or authenticated is still HTTP 200 with
        ok=false, so inspect that field rather than relying on the status code.
        Pass vault_ids to probe authenticated; omit them to probe anonymously.
      operationId: managedAgentsProbeMCPServer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagedAgentsProbeMCPServerRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsMCPProbeResponse'
          description: >-
            Response body of POST /v1/mcp/probe: the result of one live
            connection attempt to an MCP server, run through the same URL and
            vault resolution a real session uses. This envelope is a verdict
            rather than a resource: a server that is down is still HTTP 200 with
            ok=false, so a caller can distinguish "the server you configured is
            unreachable" from "this API is unreachable". Nothing is persisted by
            a probe.
        '400':
          description: The request was rejected by schema or semantic validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '401':
          description: The caller is unauthenticated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '403':
          description: The caller lacks a required permission or capability.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
        '404':
          description: No such resource is reachable for this caller.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorNotFound'
        '409':
          description: >-
            The request conflicts with the resource state, or with an in-flight
            idempotent replay.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '413':
          description: The request exceeds a size or transaction budget.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '415':
          description: The request body uses a media type this operation does not accept.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnsupportedMediaType'
        '429':
          headers:
            Retry-After:
              description: Seconds the caller should wait before retrying.
              schema:
                type: string
              style: simple
          description: A rate limit is exhausted. Honor `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '500':
          description: An unexpected server-side failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '502':
          description: The service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorBadGateway'
        '503':
          headers:
            Retry-After:
              description: Seconds the caller should wait before retrying.
              schema:
                type: string
              style: simple
          description: A dependency is unavailable. Retryable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiError'
        '504':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
          description: The service did not respond before the timeout. Retryable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorGatewayTimeout'
components:
  schemas:
    ManagedAgentsProbeMCPServerRequest:
      description: >-
        Request body for a live connection test against an MCP server, running
        the same credential resolution a session would. An unreachable server is
        reported in the response body, not as an HTTP error.
      properties:
        server_url:
          description: >-
            The MCP server to connect to. Must be http or https and must not
            embed credentials.
          type: string
        vault_ids:
          description: >-
            Vaults whose credentials may be used, scoped exactly as a session's
            grant is. Omit to probe unauthenticated.
          items:
            type: string
          type: array
      required:
        - server_url
      type: object
      example:
        server_url: https://example.com
        vault_ids:
          - example
    ManagedAgentsMCPProbeResponse:
      description: >-
        Response body of POST /v1/mcp/probe: the result of one live connection
        attempt to an MCP server, run through the same URL and vault resolution
        a real session uses. This envelope is a verdict rather than a resource:
        a server that is down is still HTTP 200 with ok=false, so a caller can
        distinguish "the server you configured is unreachable" from "this API is
        unreachable". Nothing is persisted by a probe.
      properties:
        credential_matched:
          description: >-
            True when a credential from the named vaults was opened and attached
            to the request. It reports whether this attempt was authenticated,
            not whether a credential exists: a credential that matched the
            server URL but could not be opened reports false and sets
            credential_unopenable, because nothing was sent.
          type: boolean
        credential_unopenable:
          description: >-
            Set when a credential matched this server URL and could not be
            opened, so the request carried no auth header. external_reference
            means the material is held outside this service and must be
            re-entered here; material_missing means the credential row carries
            no stored value. Empty when none matched or the match was usable.
          enum:
            - external_reference
            - material_missing
          type: string
        deployment_authorized:
          description: >-
            True when a deployment-owned access-token policy authorizes this
            endpoint for the organization and each request mints a token for the
            deployment's reader identity. Distinct from credential_matched: no
            vault credential is involved. For endpoints that answer discovery
            unauthenticated (Google hosted MCPs), a green tool list proves
            connectivity and discovery, not provider-side IAM — only a real tool
            call does.
          type: boolean
        error:
          description: >-
            Operator-facing diagnostic when the probe failed. Never contains
            credential material.
          type: string
        ok:
          description: >-
            True when the server completed the handshake and returned a tool
            list.
          type: boolean
        protocol_version:
          description: The MCP protocol version used.
          type: string
        reachable:
          description: >-
            True when the handshake succeeded, even if listing tools then
            failed.
          type: boolean
        server_name:
          description: >-
            What the server called itself during the handshake, which is how an
            operator confirms the URL reached the intended service.
          type: string
        tools:
          description: >-
            Tools the server advertised on this attempt. Always an array and
            never null: empty means the handshake succeeded but the server
            offered no tools, or listing them failed, which is what ok=false
            plus reachable=true reports.
          items:
            $ref: '#/components/schemas/ManagedAgentsMCPProbeTool'
          type: array
      required:
        - ok
        - reachable
        - credential_matched
        - deployment_authorized
        - tools
      type: object
      example:
        credential_matched: true
        credential_unopenable: external_reference
        deployment_authorized: true
        error: example
        ok: true
        protocol_version: example
        reachable: true
        server_name: example
        tools:
          - description: example
            name: example-name
    ManagedAgentsApiError:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - analytics
            - analytics_not_ready
            - artifact_fetch_unavailable
            - artifact_generation_mismatch
            - artifact_hash_mismatch
            - artifact_invalid_events
            - artifact_invalid_json
            - artifact_not_allowlisted
            - artifact_size_mismatch
            - atlassian_rate_limited
            - atlassian_unavailable
            - atomic_ingest_timeout
            - auth_unavailable
            - automation_event_source_invalid
            - automation_memory_unavailable
            - automation_reference_invalid
            - automation_runs_unconfigured
            - automations_unconfigured
            - bad_gateway
            - built_in_catalog_unavailable
            - built_in_integrations_disabled
            - built_in_integrations_unconfigured
            - compute_offerings_unavailable
            - conflict
            - content_store_request_canceled
            - content_store_unavailable
            - content_store_upload_timeout
            - credential_encryption_unconfigured
            - delegate_preparation_failed
            - entity_family_not_permitted
            - environment_not_verified
            - evaluation_cancellation_pending
            - evaluation_deletion_pending
            - event_admission_unavailable
            - event_ingress_unavailable
            - event_source_verification_credential_invalid
            - event_sources_unconfigured
            - execution_unconfigured
            - file_quota_exceeded
            - file_storage_unconfigured
            - forbidden
            - gateway_timeout
            - gestalt_unconfigured
            - github_rate_limited
            - github_unavailable
            - handoff_access_invalid
            - handoff_access_unavailable
            - handoff_access_unsupported
            - handoff_capture_unavailable
            - handoff_requires_retest
            - handoff_revoke_unavailable
            - handoff_signal_unavailable
            - idempotency_conflict
            - idempotency_in_progress
            - idempotency_unavailable
            - ingest_policy_changed
            - ingest_policy_not_found
            - ingest_policy_revoked
            - integrations_unconfigured
            - internal_error
            - invalid_json
            - invalid_pull_request_review_result
            - invalid_request
            - invalid_scope
            - invariant_violation
            - launchdarkly_rate_limited
            - launchdarkly_unavailable
            - live_fleet_unconfigured
            - managed_agents_unavailable
            - merge_key_rejected
            - merge_link_unavailable
            - merge_rate_limited
            - merge_unavailable
            - missing_dependency
            - model_gateway_metadata_missing
            - model_gateway_unconfigured
            - model_gateway_unreachable
            - mutation_transaction_budget_exceeded
            - not_found
            - page_token_expired
            - payload_too_large
            - persistence_busy
            - precondition_failed
            - precondition_required
            - provider_registration_unsupported
            - provider_selection_unsupported
            - rate_limit_exceeded
            - rate_limited
            - repository_automation_unconfigured
            - request_too_large
            - reserved_source_type
            - revision_conflict
            - run_log_store_unavailable
            - runner_image_resolution_failed
            - sandbox_provider_disabled
            - service_unavailable
            - session_analyst_busy
            - session_analyst_model_unavailable
            - session_analyst_unconfigured
            - session_start_admission_unavailable
            - session_start_not_admitted
            - setup_fallback_environment_unsafe
            - setup_run_finished
            - setup_run_in_progress
            - setup_run_limit
            - setup_run_not_started
            - setup_runs_unavailable
            - skill_storage_unconfigured
            - slack_channels_rejected
            - slack_channels_unavailable
            - slack_channels_unconfigured
            - slack_connection_malformed
            - slack_event_intake_unavailable
            - slack_installation_mismatch
            - slack_missing_scope
            - slack_rate_limited
            - slack_reapproval_required
            - source_ownership_mismatch
            - source_revision_conflict
            - spanner_unavailable
            - streaming_unsupported
            - submission_transaction_budget_exceeded
            - task_version_number_conflict
            - team_board_unconfigured
            - too_many_streams
            - unauthorized
            - unsupported_media_type
            - vault_creation_retired
            - version_content_conflict
            - webhook_delivery_too_large
            - workspace_boundary_denied
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorForbidden:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - forbidden
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorNotFound:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - not_found
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnsupportedMediaType:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unsupported_media_type
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorBadGateway:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - bad_gateway
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorGatewayTimeout:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - gateway_timeout
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          description: Optional structured error details.
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsMCPProbeTool:
      description: >-
        One tool advertised by a probed MCP server, reported verbatim from its
        tools/list response. Appears only inside MCPProbeResponse.tools; the
        service does not persist or validate these entries, so their presence
        proves the server answered, not that the tool works.
      properties:
        description:
          description: >-
            The tool's own self-description as returned by the server, passed
            through verbatim. Absent when the server advertised the tool without
            one.
          type: string
        name:
          description: >-
            The tool name as the MCP server reported it, which is the name an
            agent would call it by.
          type: string
      required:
        - name
      type: object
      example:
        description: example
        name: example-name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````