Analysis tools

Project-wide audits: code quality, performance, and styling attribute usage across your elements.

These tools live in the on-demand catalog rather than the default tool list, keeping the connected client's context small. Discover them with search_tools (e.g. search_tools(queries: ["analysis"])) and run them with execute_tools — or call them directly if your client has already loaded them.


Analyze Attributes

analyze_attributes read-only via execute_tools

Audit PHP 8 attribute usage across a project. Three modes: usage (default) → all attributes used + counts (optional file_type filter); missing → files of a file_type lacking a required attribute (e.g. FormRequests missing FailOnUnknownFields); search → files where an attribute contains a value (e.g. models where Fillable contains 'email', optional file_type).

Parameters

  • Name
    mode
    Type
    string
    Description

    Analysis mode: "usage" (list all attributes), "missing" (find files missing an attribute), "search" (find files with specific attribute value). Default: usage.

  • Name
    file_type
    Type
    string
    Description

    Filter by file type (e.g., "model", "controller", "class", "middleware").

  • Name
    attribute
    Type
    string
    Description

    Attribute name to analyze (required for "missing" and "search" modes).

  • Name
    value
    Type
    string
    Description

    Value to search for in attribute arguments (for "search" mode).


Search Attributes

search_attributes read-only via execute_tools

Find available PHP 8 attributes in Laravel (name, namespace, target, expected args) before adding them to files/methods. Three modes: no params → list categories (eloquent, queue, routing, …); category only → all attributes in it (e.g. eloquent → Fillable, Hidden, …); query → search names (e.g. "fill" → Fillable), optionally scoped by category.

Parameters

  • Name
    query
    Type
    string
    Description

    Search term to match against attribute names (e.g., "fillable", "middleware", "tries"). Optional - omit to list categories or all attributes in a category.

  • Name
    category
    Type
    string
    Description

    Filter to a specific category (e.g., "eloquent", "queue", "routing", "console", "container", "request", "testing", "resource", "factory"). When provided without query, returns all attributes in that category.

  • Name
    target
    Type
    string
    Description

    Filter attributes by where they can be applied. Default: returns all.


Analyze Performance

analyze_performance read-only via execute_tools

Analyze execution performance from logs. Types: full, slow_methods, high_query_methods, high_memory_methods, failure_rates, trend.

Parameters

  • Name
    type
    Type
    string
    Description

    Type of analysis to run (default: full)

  • Name
    days
    Type
    number
    Description

    Number of days to analyze (default: 7)

  • Name
    limit
    Type
    number
    Description

    Maximum results for specific queries (default: 10)


Analyze Quality

analyze_quality read-only via execute_tools

Analyze Laravel code for quality issues. Types: full, relationships, fillables, casts, routes. Returns actionable suggestions.

Parameters

  • Name
    type
    Type
    string
    Description

    Type of analysis to run (default: full)