Return the zero-config, IDE-driven tool set.
()
| 66 | |
| 67 | |
| 68 | def _fine_grained_tools() -> list[Tool]: |
| 69 | """Return the zero-config, IDE-driven tool set.""" |
| 70 | return [ |
| 71 | Tool( |
| 72 | name="analyze_repo", |
| 73 | description=( |
| 74 | "Analyze a code repository's structure, dependencies, and components " |
| 75 | "using Tree-sitter AST parsing. No LLM required. " |
| 76 | "Writes the full component index, leaf nodes, and language stats to " |
| 77 | "workspace files on disk, and returns file paths plus a compact summary. " |
| 78 | "Read the workspace files for complete data. " |
| 79 | "This is the entry point for the wiki generation pipeline. " |
| 80 | "After calling this, use get_prompt('cluster') to learn clustering rules, " |
| 81 | "then save_module_tree to persist your grouping. " |
| 82 | "INCREMENTAL UPDATE: If docs already exist in output_dir (metadata.json + " |
| 83 | "module_tree.json), the response includes a 'changes' field showing which " |
| 84 | "files changed and which modules need updating." |
| 85 | ), |
| 86 | inputSchema={ |
| 87 | "type": "object", |
| 88 | "properties": { |
| 89 | "repo_path": { |
| 90 | "type": "string", |
| 91 | "description": "Absolute path to the repository to analyze", |
| 92 | }, |
| 93 | "output_dir": { |
| 94 | "type": "string", |
| 95 | "description": "Output directory for generated docs (default: <repo>/docs)", |
| 96 | }, |
| 97 | "include_patterns": { |
| 98 | "type": "string", |
| 99 | "description": "Comma-separated file patterns to include (e.g., '*.py,*.js')", |
| 100 | }, |
| 101 | "exclude_patterns": { |
| 102 | "type": "string", |
| 103 | "description": "Comma-separated patterns to exclude (e.g., '*test*,*spec*')", |
| 104 | }, |
| 105 | "use_gitignore": { |
| 106 | "type": "boolean", |
| 107 | "description": "Apply Git ignore rules before analysis (default: true)", |
| 108 | "default": True, |
| 109 | }, |
| 110 | }, |
| 111 | "required": ["repo_path"], |
| 112 | }, |
| 113 | ), |
| 114 | Tool( |
| 115 | name="read_code_components", |
| 116 | description=( |
| 117 | "Write the source code for a list of component IDs to workspace files. " |
| 118 | "Component IDs have the form 'file_path::ComponentName'. " |
| 119 | "Each component's full source is written to an individual .src file " |
| 120 | "in the session's sources/ directory. Returns file paths — no truncation." |
| 121 | ), |
| 122 | inputSchema={ |
| 123 | "type": "object", |
| 124 | "properties": { |
| 125 | "session_id": { |