update_file_metadata
Track file purpose, type, complexity, and dependencies to ensure accurate project understanding and efficient dependency management.
Instructions
Track important file metadata for project understanding and dependency management.
This tool provides flexible project lookup. You can specify any combination of identifiers, and it will resolve to the matching project.
Priority: project_id > workspace_path > project_name
WHEN TO USE:
After creating new files to document their purpose and relationships
When you understand a file's dependencies on other files
To update complexity assessments as files grow
To organize files into logical modules
When refactoring changes file dependencies
RECOMMENDED FOR: Key architectural files, complex modules, files with many dependencies. This helps build a dependency graph and understand the codebase structure.
FILE TYPES:
"source": Production code files (default)
"test": Test files and test suites
"config": Configuration files (package.json, .env, etc.)
"doc": Documentation files (README, docs, etc.)
COMPLEXITY LEVELS:
"low": Simple files, straightforward logic, minimal dependencies
"medium": Moderate complexity, some business logic, several dependencies
"high": Complex files, intricate logic, many dependencies, high cognitive load
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module | No | Logical module/component this file belongs to (optional) - e.g., "auth", "ui", "api" | |
| purpose | No | Brief description of what this file does (optional) | |
| file_path | Yes | Path of the file (required) - e.g., "src/components/Button.tsx" | |
| file_type | No | Type of file - "source", "test", "config", or "doc" (default: "source") | source |
| complexity | No | Complexity level - "low", "medium", or "high" (default: "low") | low |
| dependents | No | List of files that import/depend on this file (optional) | |
| project_id | No | Project ID from create_project() (optional if project_name or workspace_path provided) | |
| dependencies | No | List of files this file imports/depends on (optional) - e.g., ["src/utils.ts", "src/types.ts"] | |
| project_name | No | Project name to look up (alternative to project_id) | |
| lines_of_code | No | Approximate line count (optional, for tracking growth) | |
| workspace_path | No | Workspace directory path (alternative to project_id) | |
| last_modified_by | No | Your agent_id from register_agent() (optional) |