gograph_globals
Find package-level variables and the functions that mutate them. Use to audit mutable global state, identify thread-safety hazards, and locate shared singletons before concurrency refactoring.
Instructions
Find package-level variable declarations (var blocks) and the functions that mutate them in a specific package. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. WHEN TO USE: When auditing mutable global state, identifying thread-safety hazards, or locating shared singleton variables before a concurrency refactor. NOT TO USE: For local-scope variables; for environment variable reads (use gograph_envs). RETURNS: Package-level variable names, types, and the functions that write to them; empty when the package has no package-level variables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | The package name or path to inspect (e.g., 'internal/config') |