find_route
Searches Symfony routes by URL pattern or route name and optional HTTP method, returning a table of matches with route path, methods, and controller.
Instructions
Find Symfony routes matching a URL pattern or route name.
Runs php bin/console debug:router --format=json and filters the results.
Args: url_pattern: Substring or regex to match against route paths and route names. Examples: "/api/users", "user_show", "^/admin" method: Optional HTTP method filter (GET, POST, PUT, PATCH, DELETE). Empty string = no filter (matches all methods).
Returns a Markdown table with: route name, path, allowed methods, controller. For single matches, the full route definition is included.
Requires PHP and bin/console to be accessible (configure via DOCKER_CONTAINER or PHP_EXECUTABLE if using Docker/DDEV/Lando).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url_pattern | Yes | ||
| method | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |