list-file-types
Discover supported file types for text searches in ripgrep to target specific file formats during system-wide searches.
Instructions
List all supported file types in ripgrep
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:489-509 (handler)The handler function for 'list-file-types' tool. It runs 'rg --type-list --color never', processes the output by stripping ANSI codes, and returns it as text content.case "list-file-types": { // No colors for type listing const command = "rg --type-list --color never"; console.error(`Executing: ${command}`); const { stdout, stderr } = await exec(command); // If there's anything in stderr, log it for debugging if (stderr) { console.error(`ripgrep stderr: ${stderr}`); } return { content: [ { type: "text", text: stripAnsiEscapeCodes(stdout) || "Failed to get file types" } ] }; }
- src/index.ts:169-177 (registration)Registration of the 'list-file-types' tool in the ListTools response, including its name, description, and empty input schema (no parameters required).{ name: "list-file-types", description: "List all supported file types in ripgrep", inputSchema: { type: "object", properties: {} } } ]
- src/index.ts:172-177 (schema)The input schema for 'list-file-types', which is an empty object indicating no input parameters are needed.inputSchema: { type: "object", properties: {} } } ]