Get workspace intelligence for a file
workspace_get_file_contextRetrieve file fragility and co-change partners from workspace.json to ensure safe edits by identifying error-prone files and related files modified together.
Instructions
Return behavioral intelligence about a single file from workspace.json BEFORE you edit it.
Combines two signals the current source tree cannot reveal on its own:
Fragility: whether this file is historically error-prone / high blast radius, with reason and evidence when available.
Co-change: which other files have historically been edited together with this one.
Call this before editing or creating a file. Treat a fragile result as a reason to make minimal, well-tested changes; treat co-change partners as candidates for related edits.
Args:
path (string): repo-relative or absolute file path.
Returns JSON: { "path": string, "fragile": boolean, "fragility": { "reason"?: string, "score"?: number, "evidence"?: string[] } | null, "coChangePartners": string[], "indexed": boolean, // whether the file appears in the workspace file index "workspaceVersion": string | null }
Returns fragile:false with empty partners when the file has no recorded history (this is a real answer, not an error).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The file path to look up. Absolute or repo-relative both work (matched on suffix). Example: 'src/db/client.ts'. |