> ## 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.

# Approve or block an AI tool, or mark it not reviewed

> Record the company's decision on one AI tool (`toolKey` from `getAiTools` or `getAiTool`): `approved`, `blocked` or `not_reviewed`, and return the tool's policy. A decision only: Primo removes nothing from the devices and does not stop the tool. A 404 means no device reports the tool. For several tools at once (every MCP server, every tool not reviewed yet), use `setAiToolPolicies`. The policy a tool gets when a device first reports it is `defaultPolicy`, in `updateAiToolsSettings`. AI tools are what Primo finds on Macs (assistant apps, coding agents, IDE plugins, browser extensions, MCP servers, AI connections, agent instruction files), as of the last report (`lastSyncedAt` of `getAiToolsOverview`, every 5 minutes), with Primo's severities, less the findings the company's AI tools settings ignore. They are not the software catalog (`getSoftwares`, `getDeviceSoftware`), the company's own AI agents (`listAgents`) nor AI credits (`getAiUsage`). A company without AI tools monitoring gets a 403, final.

Key: WriteScope: Company


## OpenAPI

````yaml https://api.getprimo.com/openapi.json put /ai-tools/tools/{toolKey}/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:
  /ai-tools/tools/{toolKey}/policy:
    put:
      tags:
        - AiTools
      summary: Approve or block an AI tool, or mark it not reviewed
      description: >-
        Record the company's decision on one AI tool (`toolKey` from
        `getAiTools` or `getAiTool`): `approved`, `blocked` or `not_reviewed`,
        and return the tool's policy. A decision only: Primo removes nothing
        from the devices and does not stop the tool. A 404 means no device
        reports the tool. For several tools at once (every MCP server, every
        tool not reviewed yet), use `setAiToolPolicies`. The policy a tool gets
        when a device first reports it is `defaultPolicy`, in
        `updateAiToolsSettings`. AI tools are what Primo finds on Macs
        (assistant apps, coding agents, IDE plugins, browser extensions, MCP
        servers, AI connections, agent instruction files), as of the last report
        (`lastSyncedAt` of `getAiToolsOverview`, every 5 minutes), with Primo's
        severities, less the findings the company's AI tools settings ignore.
        They are not the software catalog (`getSoftwares`, `getDeviceSoftware`),
        the company's own AI agents (`listAgents`) nor AI credits
        (`getAiUsage`). A company without AI tools monitoring gets a 403, final.
      operationId: setAiToolPolicy
      parameters:
        - name: toolKey
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetAiToolPolicyBody'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetAiToolPolicyResponse_Output'
components:
  schemas:
    SetAiToolPolicyBody:
      type: object
      properties:
        status:
          description: >-
            The company's decision on the tool: not_reviewed, approved or
            blocked
          type: string
          enum:
            - not_reviewed
            - approved
            - blocked
      required:
        - status
    SetAiToolPolicyResponse_Output:
      type: object
      properties:
        status:
          description: >-
            The company's decision on the tool: not_reviewed, approved or
            blocked
          type: string
          enum:
            - not_reviewed
            - approved
            - blocked
        source:
          description: >-
            default: the policy the settings gave the tool when a device first
            reported it; admin: a decision
          type: string
          enum:
            - default
            - admin
        decidedAt:
          description: >-
            When the policy was set (ISO 8601); null before the first sync
            stamps it
          anyOf:
            - type: string
            - type: 'null'
      required:
        - status
        - source
        - decidedAt
      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.