Fastly · Capability

Fastly Client-Side Protection — Scripts

Inventory and manage third-party scripts detected by Fastly Client-Side Protection on a monitored website.

Fastly Client-Side Protection — Scripts is a Naftiko capability published by Fastly, one of 73 capabilities the APIs.io network indexes for this provider. It bundles 3 operations across the GET and PATCH methods rooted at /v1/client-side-protection/websites/{…}/scripts.

The capability includes 2 read-only operations and 1 state-changing operation. Lead operation: List Fastly CSP detected scripts. Can be deployed as a REST endpoint, MCP tool, or Agent Skill via Naftiko.

Tagged areas include Fastly, Client-Side Protection, Security, and Scripts.

Run with Naftiko FastlyClient-Side ProtectionSecurityScripts

What You Can Do

GET
Listscripts — List scripts
/v1/client-side-protection/websites/{website-id}/scripts
GET
Getscript — Get script
/v1/client-side-protection/websites/{website-id}/scripts/{script-id}
PATCH
Updatescript — Update script
/v1/client-side-protection/websites/{website-id}/scripts/{script-id}

MCP Tools

list-csp-scripts

List Fastly CSP detected scripts

read-only idempotent
get-csp-script

Get a Fastly CSP script

read-only idempotent
update-csp-script

Authorize or update a Fastly CSP script

idempotent

Capability Spec

client-side-protection-scripts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Fastly Client-Side Protection — Scripts
  description: Inventory and manage third-party scripts detected by Fastly Client-Side Protection on a monitored website.
  tags: [Fastly, Client-Side Protection, Security, Scripts]
  created: '2026-05-22'
  modified: '2026-05-22'
binds:
- namespace: env
  keys: { FASTLY_API_KEY: FASTLY_API_KEY }
capability:
  consumes:
  - type: http
    namespace: client-side-protection-scripts
    baseUri: https://api.fastly.com
    description: CSP scripts inventory and authorization.
    resources:
    - name: scripts
      path: /client-side-protection/websites/{website_id}/scripts
      operations:
      - { name: listscripts, method: GET, description: List scripts, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] }
    - name: script
      path: /client-side-protection/websites/{website_id}/scripts/{script_id}
      operations:
      - { name: getscript, method: GET, description: Get script, outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] }
      - { name: updatescript, method: PATCH, description: Update script (authorize/deauthorize), outputRawFormat: json, outputParameters: [ { name: result, type: object, value: $. } ] }
    authentication: { type: apikey, key: Fastly-Key, value: '{{env.FASTLY_API_KEY}}', placement: header }
  exposes:
  - type: rest
    namespace: client-side-protection-scripts-rest
    port: 8080
    description: REST adapter.
    resources:
    - path: /v1/client-side-protection/websites/{website-id}/scripts
      name: scripts
      description: CSP scripts collection.
      operations:
      - { method: GET, name: listscripts, description: List scripts, call: client-side-protection-scripts.listscripts, outputParameters: [ { type: object, mapping: $. } ] }
    - path: /v1/client-side-protection/websites/{website-id}/scripts/{script-id}
      name: script
      description: Single CSP script.
      operations:
      - { method: GET, name: getscript, description: Get script, call: client-side-protection-scripts.getscript, outputParameters: [ { type: object, mapping: $. } ] }
      - { method: PATCH, name: updatescript, description: Update script, call: client-side-protection-scripts.updatescript, outputParameters: [ { type: object, mapping: $. } ] }
  - type: mcp
    namespace: client-side-protection-scripts-mcp
    port: 9090
    transport: http
    description: MCP adapter.
    tools:
    - { name: list-csp-scripts, description: List Fastly CSP detected scripts, hints: { readOnly: true, destructive: false, idempotent: true }, call: client-side-protection-scripts.listscripts, outputParameters: [ { type: object, mapping: $. } ] }
    - { name: get-csp-script, description: Get a Fastly CSP script, hints: { readOnly: true, destructive: false, idempotent: true }, call: client-side-protection-scripts.getscript, outputParameters: [ { type: object, mapping: $. } ] }
    - { name: update-csp-script, description: Authorize or update a Fastly CSP script, hints: { readOnly: false, destructive: false, idempotent: true }, call: client-side-protection-scripts.updatescript, outputParameters: [ { type: object, mapping: $. } ] }