Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

10.7 KB
Raw Blame
[
  {
    "name": "Read",
    "description": "Reads a file from the local filesystem. You can access any file directly by using this tool. Assume this tool is able to read all files on the machine. If the user provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned. The file_path parameter must be an absolute path, not a relative path. By default, it reads up to 2000 lines starting from the beginning of the file. You can optionally specify a line offset and limit (especially handy for long files), but it is recommended to read the whole file by not providing these parameters. Any lines longer than 2000 characters will be truncated. Results are returned using cat -n format, with line numbers starting at 1. This tool can only read files, not directories. To read a directory, use an ls command via the Bash tool. You have the capability to call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful. If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.",
    "input_schema": {
      "type": "object",
      "properties": {
        "file_path": {"type": "string", "description": "The absolute path to the file to read"},
        "offset": {"type": "number", "description": "The line number to start reading from. Only provide if the file is too large to read at once"},
        "limit": {"type": "number", "description": "The number of lines to read. Only provide if the file is too large to read at once."}
      },
      "required": ["file_path"],
      "additionalProperties": false
    }
  },
  {
    "name": "Edit",
    "description": "Performs exact string replacements in files. You must use your Read tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file. When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: spaces + line number + tab. Everything after that tab is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string. ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required. Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked. The edit will FAIL if old_string is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use replace_all to change every instance of old_string. Use replace_all for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.",
    "input_schema": {
      "type": "object",
      "properties": {
        "file_path": {"type": "string", "description": "The absolute path to the file to modify"},
        "old_string": {"type": "string", "description": "The text to replace"},
        "new_string": {"type": "string", "description": "The text to replace it with (must be different from old_string)"},
        "replace_all": {"type": "boolean", "default": false, "description": "Replace all occurences of old_string (default false)"}
      },
      "required": ["file_path", "old_string", "new_string"],
      "additionalProperties": false
    }
  },
  {
    "name": "Write",
    "description": "Writes a file to the local filesystem. This tool will overwrite the existing file if there is one at the provided path. If this is an existing file, you MUST use the Read tool first to read the file's contents. This tool will fail if you did not read the file first. ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required. NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User. Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.",
    "input_schema": {
      "type": "object",
      "properties": {
        "file_path": {"type": "string", "description": "The absolute path to the file to write (must be absolute, not relative)"},
        "content": {"type": "string", "description": "The content to write to the file"}
      },
      "required": ["file_path", "content"],
      "additionalProperties": false
    }
  },
  {
    "name": "Bash",
    "description": "Executes a given bash command in a persistent shell session with optional timeout, ensuring proper handling and security measures. Before executing the command, please follow these steps: 1. Directory Verification: If the command will create new directories or files, first use the LS tool to verify the parent directory exists and is the correct location. 2. Command Execution: Always quote file paths that contain spaces with double quotes. After ensuring proper quoting, execute the command. Capture the output of the command. Usage notes: The command argument is required. You can specify an optional timeout in milliseconds (up to 600000ms / 10 minutes). If not specified, commands will timeout after 120000ms (2 minutes). It is very helpful if you write a clear, concise description of what this command does in 5-10 words. If the output exceeds 30000 characters, output will be truncated before being returned to you. VERY IMPORTANT: You MUST avoid using search commands like find and grep. Instead use Grep, Glob, or Task to search. You MUST avoid read tools like cat, head, tail, and ls, and use Read and LS to read files. If you still need to run grep, STOP. ALWAYS USE ripgrep at rg first, which all Claude Code users have pre-installed. When issuing multiple commands, use the ; or && operator to separate them. DO NOT use newlines to separate commands (newlines are ok in quoted strings). Try to maintain your current working directory throughout the session by using absolute paths and avoiding usage of cd. You may use cd if the User explicitly requests it.",
    "input_schema": {
      "type": "object",
      "properties": {
        "command": {"type": "string", "description": "The command to execute"},
        "timeout": {"type": "number", "description": "Optional timeout in milliseconds (max 600000)"},
        "description": {"type": "string", "description": "Clear, concise description of what this command does in 5-10 words."},
        "run_in_background": {"type": "boolean", "description": "Set to true to run this command in the background. Use BashOutput to read the output later."}
      },
      "required": ["command"],
      "additionalProperties": false
    }
  },
  {
    "name": "Grep",
    "description": "A powerful search tool built on ripgrep. ALWAYS use Grep for search tasks. NEVER invoke grep or rg as a Bash command. The Grep tool has been optimized for correct permissions and access. Supports full regex syntax (e.g., \"log.*Error\", \"function\\s+\\w+\"). Filter files with glob parameter (e.g., \"*.js\", \"**/*.tsx\") or type parameter (e.g., \"js\", \"py\", \"rust\"). Output modes: \"content\" shows matching lines, \"files_with_matches\" shows only file paths (default), \"count\" shows match counts. Use Task tool for open-ended searches requiring multiple rounds. Pattern syntax: Uses ripgrep (not grep), so literal braces need escaping (use interface\\{\\} to find interface{} in Go code). Multiline matching: By default patterns match within single lines only. For cross-line patterns like struct \\{[\\s\\S]*?field, use multiline: true.",
    "input_schema": {
      "type": "object",
      "properties": {
        "pattern": {"type": "string", "description": "The regular expression pattern to search for in file contents"},
        "path": {"type": "string", "description": "File or directory to search in (rg PATH). Defaults to current working directory."},
        "glob": {"type": "string", "description": "Glob pattern to filter files (e.g. \"*.js\", \"*.{ts,tsx}\") - maps to rg --glob"},
        "output_mode": {"type": "string", "enum": ["content", "files_with_matches", "count"], "description": "Output mode: \"content\" shows matching lines, \"files_with_matches\" shows file paths (supports head_limit), \"count\" shows match counts (supports head_limit). Defaults to \"files_with_matches\"."},
        "-B": {"type": "number", "description": "Number of lines to show before each match (rg -B). Requires output_mode: \"content\", ignored otherwise."},
        "-A": {"type": "number", "description": "Number of lines to show after each match (rg -A). Requires output_mode: \"content\", ignored otherwise."},
        "-C": {"type": "number", "description": "Number of lines to show before and after each match (rg -C). Requires output_mode: \"content\", ignored otherwise."},
        "-n": {"type": "boolean", "description": "Show line numbers in output (rg -n). Requires output_mode: \"content\", ignored otherwise. Defaults to true."},
        "-i": {"type": "boolean", "description": "Case insensitive search (rg -i)"},
        "type": {"type": "string", "description": "File type to search (rg --type). Common types: js, py, rust, go, java, etc. More efficient than include for standard file types."},
        "head_limit": {"type": "number", "description": "Limit output to first N lines/entries, equivalent to \"| head -N\". Works across all output modes: content (limits output lines), files_with_matches (limits file paths), count (limits count entries). Defaults to 250 when unspecified."},
        "multiline": {"type": "boolean", "description": "Enable multiline mode where . matches newlines and patterns can span lines (rg -U --multiline-dotall). Default: false."}
      },
      "required": ["pattern"],
      "additionalProperties": false
    }
  },
  {
    "name": "Glob",
    "description": "Fast file pattern matching tool that works with any codebase size. Supports glob patterns like \"**/*.js\" or \"src/**/*.ts\". Returns matching file paths sorted by modification time. Use this tool when you need to find files by name patterns. When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Task tool instead. You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.",
    "input_schema": {
      "type": "object",
      "properties": {
        "pattern": {"type": "string", "description": "The glob pattern to match files against"},
        "path": {"type": "string", "description": "The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this parameter if you do not provide a value - this is the default."}
      },
      "required": ["pattern"],
      "additionalProperties": false
    }
  }
]