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

# Get the policy of an MCP Gateway connector

> Return the policy of a connector (`connectorId` from `getMcpGatewayConnectors`): who may use its approved tools, by kind. A setting is `access` (`allowed` or `blocked`: the connector itself) and `readTools`, `writeTools` and `destructiveTools` (`allowed` or `blocked`; `destructiveTools` null follows `writeTools`). `rules`, in order, each give their `setting` to the employees their `filter` matches: the first that matches applies, and `defaultSetting` to everyone else. A filter holds `teamIds`, `employeeIds` or both, each `{ operationType: INCLUDE | EXCLUDE, values }` with the ids `getEmployees` returns, and every clause must match. With none stored (`source` `credential_mode_default`, `version` null), every tool is allowed on a `per_employee` connector, the read tools only on a `shared` one. Change it with `setMcpGatewayConnectorPolicy`, sending back `version`. A 404 means the company has no such connector. The MCP Gateway serves employees, through their one Primo connection, the tools of the MCP servers (connectors) IT added. No credential is ever sent or returned here: a shared account is connected, and the address or authentication of a custom connector changed, in the cockpit, at `cockpitUrl`. A company without the MCP Gateway gets a 403 `McpGatewayNotEnabledError`; a 503 means Primo could not check it, try again in a minute.

Key: ReadScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json get /mcp-gateway/connectors/{connectorId}/policy
openapi: 3.1.1
info:
  title: Public API - BETA
  description: Read docs on https://docs.getprimo.com/
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getprimo.com
security:
  - apikey: []
tags: []
paths:
  /mcp-gateway/connectors/{connectorId}/policy:
    get:
      tags:
        - McpGateway
      summary: Get the policy of an MCP Gateway connector
      description: >-
        Return the policy of a connector (`connectorId` from
        `getMcpGatewayConnectors`): who may use its approved tools, by kind. A
        setting is `access` (`allowed` or `blocked`: the connector itself) and
        `readTools`, `writeTools` and `destructiveTools` (`allowed` or
        `blocked`; `destructiveTools` null follows `writeTools`). `rules`, in
        order, each give their `setting` to the employees their `filter`
        matches: the first that matches applies, and `defaultSetting` to
        everyone else. A filter holds `teamIds`, `employeeIds` or both, each `{
        operationType: INCLUDE | EXCLUDE, values }` with the ids `getEmployees`
        returns, and every clause must match. With none stored (`source`
        `credential_mode_default`, `version` null), every tool is allowed on a
        `per_employee` connector, the read tools only on a `shared` one. Change
        it with `setMcpGatewayConnectorPolicy`, sending back `version`. A 404
        means the company has no such connector. The MCP Gateway serves
        employees, through their one Primo connection, the tools of the MCP
        servers (connectors) IT added. No credential is ever sent or returned
        here: a shared account is connected, and the address or authentication
        of a custom connector changed, in the cockpit, at `cockpitUrl`. A
        company without the MCP Gateway gets a 403 `McpGatewayNotEnabledError`;
        a 503 means Primo could not check it, try again in a minute.
      operationId: getMcpGatewayConnectorPolicy
      parameters:
        - name: connectorId
          required: true
          in: path
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetMcpGatewayConnectorPolicyResponse_Output
components:
  schemas:
    GetMcpGatewayConnectorPolicyResponse_Output:
      type: object
      properties:
        source:
          type: string
          description: >-
            `credential_mode_default`: none is stored and the default of the
            credential mode applies
          enum:
            - stored
            - credential_mode_default
        version:
          description: What `setMcpGatewayConnectorPolicy` takes as `expectedVersion`
          anyOf:
            - type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            - type: 'null'
        defaultSetting:
          type: object
          description: Who may use the approved tools of the connector, by kind
          properties:
            access:
              description: 'The connector itself: `blocked` serves none of its tools'
              type: string
              enum:
                - allowed
                - blocked
            readTools:
              type: string
              enum:
                - allowed
                - blocked
            writeTools:
              type: string
              enum:
                - allowed
                - blocked
            destructiveTools:
              description: null follows `writeTools`
              anyOf:
                - type: string
                  enum:
                    - allowed
                    - blocked
                - type: 'null'
          required:
            - access
            - readTools
            - writeTools
            - destructiveTools
          additionalProperties: false
        rules:
          type: array
          description: 'In order: the first whose filter matches an employee applies'
          items:
            type: object
            properties:
              name:
                description: Unique in the policy, whatever its case
                type: string
                minLength: 1
                maxLength: 80
              filter:
                description: 'Who the rule applies to: every clause given must match'
                type: object
                properties:
                  teamIds:
                    description: Team ids, as `getEmployees` returns them
                    type: object
                    properties:
                      operationType:
                        type: string
                        enum:
                          - INCLUDE
                          - EXCLUDE
                      values:
                        minItems: 1
                        maxItems: 500
                        type: array
                        items:
                          type: string
                          pattern: ^[a-f\d]{24}$
                    required:
                      - operationType
                      - values
                    additionalProperties: false
                  employeeIds:
                    description: Employee ids, as `getEmployees` returns them
                    type: object
                    properties:
                      operationType:
                        type: string
                        enum:
                          - INCLUDE
                          - EXCLUDE
                      values:
                        minItems: 1
                        maxItems: 500
                        type: array
                        items:
                          type: string
                          pattern: ^[a-f\d]{24}$
                    required:
                      - operationType
                      - values
                    additionalProperties: false
                additionalProperties: false
              setting:
                type: object
                description: Who may use the approved tools of the connector, by kind
                properties:
                  access:
                    description: 'The connector itself: `blocked` serves none of its tools'
                    type: string
                    enum:
                      - allowed
                      - blocked
                  readTools:
                    type: string
                    enum:
                      - allowed
                      - blocked
                  writeTools:
                    type: string
                    enum:
                      - allowed
                      - blocked
                  destructiveTools:
                    description: null follows `writeTools`
                    anyOf:
                      - type: string
                        enum:
                          - allowed
                          - blocked
                      - type: 'null'
                required:
                  - access
                  - readTools
                  - writeTools
                  - destructiveTools
                additionalProperties: false
            required:
              - name
              - filter
              - setting
            additionalProperties: false
        updatedAt:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - source
        - version
        - defaultSetting
        - rules
        - updatedAt
      additionalProperties: false
  securitySchemes:
    apikey:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Use your Primo API key in the Authorization header as `Bearer
        <API_KEY>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.