You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tools/lsp/tools.ts
+39-51Lines changed: 39 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,11 @@ import type {
35
35
36
36
37
37
exportconstlsp_hover=tool({
38
-
description:
39
-
"Get type information, documentation, and signature for a symbol at a specific position in a file. Use this when you need to understand what a variable, function, class, or any identifier represents.",
38
+
description: "Get type info, docs, and signature for a symbol at position.",
40
39
args: {
41
-
filePath: tool.schema.string().describe("The absolute path to the file"),
42
-
line: tool.schema.number().min(1).describe("Line number (1-based)"),
43
-
character: tool.schema.number().min(0).describe("Character position (0-based)"),
"Jump to the source definition of a symbol (variable, function, class, type, import, etc.). Use this when you need to find WHERE something is defined.",
59
+
description: "Jump to symbol definition. Find WHERE something is defined.",
62
60
args: {
63
-
filePath: tool.schema.string().describe("The absolute path to the file"),
64
-
line: tool.schema.number().min(1).describe("Line number (1-based)"),
65
-
character: tool.schema.number().min(0).describe("Character position (0-based)"),
"Get a hierarchical outline of all symbols (classes, functions, methods, variables, types, constants) in a single file. Use this to quickly understand a file's structure.",
133
+
description: "Get hierarchical outline of all symbols in a file.",
138
134
args: {
139
-
filePath: tool.schema.string().describe("The absolute path to the file"),
"Search for symbols by name across the ENTIRE workspace/project. Use this when you know (or partially know) a symbol's name but don't know which file it's in.",
171
+
description: "Search symbols by name across ENTIRE workspace.",
177
172
args: {
178
-
filePath: tool.schema.string().describe("A file path in the workspace to determine the workspace root"),
179
-
query: tool.schema.string().describe("The symbol name to search for (supports fuzzy matching)"),
180
-
limit: tool.schema.number().optional().describe("Maximum number of results to return"),
173
+
filePath: tool.schema.string(),
174
+
query: tool.schema.string().describe("Symbol name (fuzzy match)"),
"Get all errors, warnings, and hints for a file from the language server. Use this to check if code has type errors, syntax issues, or linting problems BEFORE running the build.",
206
+
description: "Get errors, warnings, hints from language server BEFORE running build.",
213
207
args: {
214
-
filePath: tool.schema.string().describe("The absolute path to the file"),
"Check if a symbol at a specific position can be renamed. Use this BEFORE attempting to rename to validate the operation and get the current symbol name.",
275
+
description: "Check if rename is valid. Use BEFORE lsp_rename.",
283
276
args: {
284
-
filePath: tool.schema.string().describe("The absolute path to the file"),
285
-
line: tool.schema.number().min(1).describe("Line number (1-based)"),
286
-
character: tool.schema.number().min(0).describe("Character position (0-based)"),
"Get available code actions for a range in the file. Code actions include quick fixes, refactorings (extract, inline, rewrite), and source actions (organize imports, fix all). Use this to discover what automated changes the language server can perform.",
322
+
description: "Get available quick fixes, refactorings, and source actions (organize imports, fix all).",
332
323
args: {
333
-
filePath: tool.schema.string().describe("The absolute path to the file"),
334
-
startLine: tool.schema.number().min(1).describe("Start line number (1-based)"),
335
-
startCharacter: tool.schema.number().min(0).describe("Start character position (0-based)"),
336
-
endLine: tool.schema.number().min(1).describe("End line number (1-based)"),
337
-
endCharacter: tool.schema.number().min(0).describe("End character position (0-based)"),
"Resolve and APPLY a code action. This resolves the full details and applies the changes to files. Use after getting a code action from lsp_code_actions.",
366
+
description: "Resolve and APPLY a code action from lsp_code_actions.",
377
367
args: {
378
-
filePath: tool.schema
379
-
.string()
380
-
.describe("The absolute path to a file in the workspace (used to find the LSP server)"),
381
-
codeAction: tool.schema.string().describe("The code action JSON object as returned by lsp_code_actions (stringified)"),
368
+
filePath: tool.schema.string(),
369
+
codeAction: tool.schema.string().describe("Code action JSON from lsp_code_actions"),
0 commit comments