Build a Content-Security-Policy
build_cspBuild a Content-Security-Policy from directives, or lint an existing policy. Returns the header line, a Next.js headers() snippet, and warnings for unsafe sources.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "build_csp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | No | An existing Content-Security-Policy value to lint. When set, directive fields are ignored. | |
| sources | No | ||
| blockAllMixedContent | No | ||
| upgradeInsecureRequests | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| checks | Yes | ||
| header | Yes | ||
| policy | Yes | ||
| nextConfig | Yes |