-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Description
The extract_symbols MCP tool currently only detects functions declared with the function keyword. It fails to identify arrow functions, which are widely used in modern JavaScript/TypeScript codebases.
Current Behavior:
The tool only returns symbols for traditional function declarations:
// ✅ Detected
function handleSubmit(data) {
// ...
}
// ❌ Not detected
const handleSubmit = (data) => {
// ...
};
// ❌ Not detected
const fetchData = async (url) => {
// ...
};
// ❌ Not detected (object method shorthand)
const api = {
getData: () => { ... },
postData: async (payload) => { ... }
};Expected Behavior:
extract_symbols should detect all function-like declarations including:
- Arrow functions assigned to variables (const fn = () => {})
- Async arrow functions (const fn = async () => {})
- Arrow functions as object properties
- Arrow functions as class properties
- Exported arrow functions (export const fn = () => {})
Impact:
This limitation affects workflows that rely on symbol extraction for:
- Mapping git diff changes to enclosing functions
- Code navigation and analysis
- Automated test generation based on function signatures
Environment:
Tool: extract_symbols from kit-mcp
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels