Skip to main content
Glama

generate_csp_config

Generate Content Security Policy (CSP) middleware with nonce generation, violation reporting, and per-framework integration (Express, Next.js, Django, Rails)

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": {
      "framework": "<framework>"
    },
    "name": "generate_csp_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
nonceNo
frameworkYes
directivesNo
reportOnlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden. It mentions nonce generation and violation reporting, but it does not explain what output is produced, how directives are applied, what reportOnly changes, or any operational constraints.

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?

The description is a single front-loaded sentence with no filler, and the core purpose appears immediately. It is compact but slightly overloaded by a partial framework list that could be clearer or omitted.

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

Completeness2/5

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

This is a 4-parameter tool with a nested directives object, no output schema, and no schema parameter descriptions. The one-sentence description is not complete enough to explain how to use those parameters or what the generated middleware/configuration contains.

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

Parameters2/5

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

Schema description coverage is 0%, so the description should compensate. It partially explains the framework parameter by listing Express, Next.js, Django, and Rails, but it omits fastify, flask, and nginx from the schema enum, and it never explains nonce, directives, or reportOnly.

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?

The description states a specific verb and resource: generate Content Security Policy middleware. It also names concrete features (nonce generation, violation reporting, per-framework integration) that distinguish it from the many other generate_*_config siblings.

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

Usage Guidelines2/5

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

The description implies the tool is for CSP generation and mentions frameworks, but it gives no explicit when-to-use or when-not-to-use guidance. It also does not name alternatives or conditions for choosing this over related config generators.

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.