Skip to main content
Glama
mcollina

MCP Ripgrep Server

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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: {}
        }
      }
    ]
  • The input schema for 'list-file-types', which is an empty object indicating no input parameters are needed.
        inputSchema: {
          type: "object",
          properties: {}
        }
      }
    ]
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation by using 'List', but doesn't specify details like output format, pagination, or performance characteristics. It adds minimal context beyond the basic purpose, meeting a baseline level.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without any fluff or redundancy. It's front-loaded and efficiently communicates the essential information, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It covers the basic purpose but lacks details on output format or behavioral traits, which could be helpful for an agent. It meets the minimum viable standard for this context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately avoids discussing parameters, earning a high score as it doesn't add unnecessary information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'all supported file types in ripgrep', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'list-files' or 'advanced-search', which might also involve listing operations, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as 'list-files' or 'search'. There's no mention of context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcollina/mcp-ripgrep'

If you have feedback or need assistance with the MCP directory API, please join our Discord server