Skip to main content
Glama

.htaccess generator

htaccess_generator
Read-onlyIdempotent

Builds a commented .htaccess file for Apache and LiteSpeed: force HTTPS, www or non-www, 301 redirects, error pages, security headers, caching, compression and IP blocks. Returns the file text and findings.

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": "htaccess_generator"
  }
}

Input Schema

NameRequiredDescriptionDefault
wwwNoRedirect to the www or the non-www host. Defaults to none.
hstsNoSend the Strict-Transport-Security header.
httpsNoRedirect HTTP to HTTPS.
domainNoThe domain the record is for, such as example.com. Optional.
cachingNoAdd browser caching rules.
nosniffNoSend X-Content-Type-Options: nosniff.
block_ipsNoIPv4 or IPv6 addresses or CIDR ranges to block.
error_403NoPath of the 403 page, such as /403.html.
error_404NoPath of the 404 page, such as /404.html.
error_500NoPath of the 500 page, such as /500.html.
redirectsNo301 redirects from an old path to a new path or URL.
no_indexesNoTurn off directory listings.
compressionNoCompress text responses.
protect_filesNoBlock access to sensitive files such as .env and .git.
hsts_subdomainsNoAdd includeSubDomains to HSTS.
referrer_policyNoSend a Referrer-Policy header.
frame_protectionNoSend X-Frame-Options.
hotlink_protectionNoBlock other sites from embedding images. Needs domain.
permissions_policyNoSend a Permissions-Policy header.
redirects_are_regexNoTreat the from values as regular expressions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered structurally. The description adds real value beyond that by disclosing the output form ('Returns the file text and findings') and that the generated file is commented, making clear nothing is written to a live server. It does not mention any length or complexity limits on the generated file, which keeps it short of a 5.

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?

Two sentences, front-loaded with the verb and resource, then the capability list and output statement. The enumeration is long but every clause corresponds to a real parameter group, so little is wasted; a slightly tighter grouping would earn a 5.

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?

With 20 optional parameters, no output schema, and rich annotations, the description supplies the missing pieces: what the tool produces and that findings accompany the file. Cross-parameter dependencies (hsts_subdomains without hsts, hotlink_protection needing domain) live in the schema's own property text rather than being restated, which is acceptable given full coverage.

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%, so all 20 parameters are already documented, including the enum for www and the hotlink_protection dependency on domain. The description's feature list maps loosely onto parameter names but adds no syntax, default, or interaction detail beyond the schema; baseline 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 ('Builds') and resource ('a commented .htaccess file'), names the target servers (Apache and LiteSpeed), and enumerates the exact capabilities covered. An agent can immediately tell this apart from the content-generator siblings such as robots_txt_generator or dmarc_record_generator by resource alone.

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

Usage Guidelines3/5

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

The feature enumeration implies when the tool is applicable (server config generation for Apache/LiteSpeed), but there is no explicit when-to-use framing, no mention of when to prefer a different approach or tool, and no stated preconditions. Usage is inferable from the capability list rather than stated.

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