Skip to main content
Glama
shamimlaravel

laravel13-livewire4.2.1-mcp

generate_custom_middleware

Generate Laravel 13 middleware to enforce auth, rate limiting, CSRF, and security. Configure type, name, redirect, rate limit, and custom logic.

Instructions

Generate Laravel 13 middleware with auth, rate limiting, CSRF, and security checks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNocustom
rateLimitNoRate limit requests per minute (for throttle type)
redirectToNoRedirect path for failed checks
customLogicNoCustom logic to execute
middlewareNameYesMiddleware name e.g. 'EnsureUserIsActive'
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the generated middleware contains but does not explain side effects such as file creation location, whether existing files are overwritten, artisan command execution, or validation behavior. The phrase 'security checks' is vague about what actually happens.

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

Conciseness5/5

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

The description is a single front-loaded sentence with all five words earning their place: verb, framework version, resource type, and feature highlights. No filler, no repetition of schema information, highly efficient.

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?

With 5 parameters, no output schema, and no annotations, the description is too thin. It conveys the tool's purpose but fails to explain operational context: what the generated middleware looks like, where it is placed, what 'custom logic' execution means, or how to choose between this and the sibling generate_middleware. The 80% schema coverage partially compensates for invocation, but not for behavioral and selection context.

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 80%, so the schema already documents rateLimit, redirectTo, customLogic, and middlewareName with meaningful descriptions. The description adds marginal context by mapping its feature list ('auth, rate limiting, CSRF') to the 'type' enum values, but it does not add per-parameter syntax or format details beyond what the schema provides, which is consistent with the baseline 3.

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

Purpose4/5

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

The description uses a specific verb ('Generate') and a specific resource ('Laravel 13 middleware') and lists key capabilities (auth, rate limiting, CSRF, security checks), making the core purpose clear. However, it does not differentiate from the sibling tool 'generate_middleware', which appears to be a close alternative.

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 provides no guidance on when to use this tool versus alternatives like generate_middleware, generate_policy, or security_audit. No when/when-not conditions or prerequisite context are given, leaving the agent to infer selection from the name alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shamimlaravel/laravel13-livewire4.2.1-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server