Skip to main content
Glama
shamimlaravel

laravel13-livewire4.2.1-mcp

generate_constraint_violation_handler

Generates a Laravel UniqueConstraintViolationException handler for a model's unique fields, providing column/index details and optional custom message.

Instructions

Generate Laravel 13.2 UniqueConstraintViolationException handler with column/index details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesFields that have unique constraints e.g. ['email', 'username']
modelNameYesModel name e.g. 'User'
customMessageNo
Behavior2/5

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

No annotations are supplied, so the description carries the full burden of behavioral disclosure. It reveals the generated artifact and its detail content, but does not disclose side effects (e.g., file creation, overwriting), required permissions, or return behavior. This is a significant gap for a code-generation tool.

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?

One sentence, front-loaded with the action and artifact, contains no redundant words; every phrase contributes meaning.

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?

Given no output schema and no annotations, the description is too sparse for a generation tool. It doesn't state whether the handler is written to disk, returned as code, what the column/index details look like, or how the optional customMessage is used.

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?

The schema already documents modelName and fields (67% coverage), but customMessage is left unexplained. The description adds only 'column/index details,' which loosely connects to the fields parameter, but doesn't clarify parameter roles or how customMessage affects output.

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 uses a specific verb ('Generate') and names the exact artifact: a Laravel UniqueConstraintViolationException handler with column/index details. This clearly differentiates it from sibling generate_* tools by product type.

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?

No guidance is provided about when to use this tool versus the many sibling generation tools, nor any exclusions or alternatives. The only clue is the tool name and description, which imply code-generation use but don't state context.

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