save_method
Update a method's properties including name, visibility, return type, parameters, and body. Provide context like summary, rationale, references, and decisions for significant changes.
Instructions
Update a method's properties. Use add_method_body to append code.
For significant changes, include context fields: summary, rationale, references, decisions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | UUID of the method to update | |
| name | No | Method name | |
| visibility | No | Method visibility (PHP only) | |
| is_static | No | Whether the method is static (PHP only) | |
| returnType | No | Return type (e.g., "int", "string", "void", "object") | |
| nullable | No | Whether the return type is nullable | |
| parameters | No | Array of parameter clause UUIDs | |
| data | No | Array of statement UUIDs that form the method body. Use to reorder or remove statements. | |
| is_async | No | Whether the method is async (JavaScript/Vue only). Set to true for methods that use await. | |
| summary | No | Context: Brief description of what this method does | |
| rationale | No | Context: Why it was built this way | |
| references | No | Context: Links to related entities [{uuid, type, relationship, note}] | |
| decisions | No | Context: Design decisions made | |
| attributes | No | PHP 8 attributes for the method (e.g., ["Route(\"/api/users\")"], ["Middleware(\"auth\")"]). Use search_attributes tool to find available attributes. |