Skip to main content
Glama

ScorpTech x402 Tools

Csp Evaluate

csp_evaluate
Read-onlyIdempotent

Evaluate a Content-Security-Policy string the way CSP Evaluator does, before you ship it: parses directives, catches typos, unquoted keywords and deprecated directives, then checks script execution (unsafe-inline without nonce/hash, unsafe-eval, wildcards, http:/https:/data: sources, 40+ known allowlist-bypass hosts with JSONP / AngularJS / user content), object-src, base-uri, frame-ancestors, form-action, reporting and Trusted Types. Returns findings with severity and fixes, a 0-100 score and A-F grade, and a strict nonce-based policy template. Returns JSON with: score, grade, strictPolicy, counts, findings, directives, recommendedTemplate. Price: $0.002 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/csp-evaluate

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "policy": "<policy>"
    },
    "name": "csp_evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
metaNoPolicy is delivered in a <meta> tag (frame-ancestors, report-uri and sandbox are then ignored by browsers)
policyYesThe policy value (without the header name)
reportOnlyNoPolicy is sent as Content-Security-Policy-Report-Only

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered by structured data. The description does add genuinely non-schema information — the pricing ($0.002 USDC per call via x402 on Base or Solana) and an alternate HTTPS endpoint — but the scoring rubric treats annotations as raising the bar, and the value here is mostly restating the check categories. It stops short of saying whether ambiguous or unparseable policies yield an error versus partial findings.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the checks, then the return shape, then pricing and endpoint — a sensible order. The middle sentence is a long comma-spliced list ("...40+ known allowlist-bypass hosts with JSONP / AngularJS / user content") that is denser than it needs to be, but nearly every clause carries real information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description compensates by naming the returned keys (score, grade, strictPolicy, counts, findings, directives, recommendedTemplate) and the 0-100 / A-F scales. Combined with the list of policy areas checked, an agent can predict both inputs and outputs; only edge-case behavior (invalid policy, non-JSON responses) is unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%; all three parameters (policy, meta, reportOnly) already carry their own descriptions, including the meta-tag caveat about frame-ancestors/report-uri/sandbox. The description adds nothing parameter-specific, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — "Evaluate a Content-Security-Policy string" — plus the reference implementation it mirrors (CSP Evaluator) and the moment of use ("before you ship it"). The enumerated checks make the scope unambiguous even though the sibling list contains only unrelated math tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"before you ship it" gives a clear timing cue, and the description implies this is the audit step for a policy you already have. It never states what to do with the results or any exclusion cases, but no plausible alternative tool exists among the siblings, so the omission is minor.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources