gograph_mutate
Find struct-field and package-global mutation sites in Go to diagnose state changes and audit mutability, excluding local-variable assignments and same-named fields on unrelated types.
Instructions
Find struct-field and package-global mutation sites. Use Type.Field to exclude same-named fields on unrelated types; ordinary local-variable assignments are excluded. A precise graph adds ++/+=, pointer-alias, atomic/sync/wrapper, and channel mutations and re-runs that analysis after source edits. WHEN TO USE: Diagnosing state changes or auditing mutability. NOT TO USE: For field declarations (gograph_fields) or whole-struct initialization (gograph_literals). RETURNS: Mutation locations and indirect mutator method names when applicable.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"field": "<field>"
},
"name": "gograph_mutate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root | No | Absolute path of your checkout or worktree (alias cwd). | |
| field | Yes | The field name to search for mutations (e.g., 'Status') | |
| limit | No | Rows per page. | |
| cursor | No | next_cursor from the previous page. | |
| intention | No | Rationale; required with an active session. | |
| session_id | No | Session from session_create; omit for none. |