Skip to content

Built-in Tools Analysis

Translation in Progress

This page is being translated. Content below is a placeholder.

Tool Categories

gemini-cli provides these built-in tools:

ToolPurpose
read_fileRead file contents
write_fileCreate/overwrite files
edit_fileModify specific parts of files
shellExecute shell commands
globFind files by pattern
grepSearch file contents
web_fetchFetch web pages
web_searchWeb search

read_file

typescript
// Schema
{
  name: 'read_file',
  parameters: {
    properties: {
      file_path: { type: 'string' },
      offset: { type: 'number' },    // Starting line
      limit: { type: 'number' }      // Max lines to read
    }
  }
}

shell

typescript
// Schema
{
  name: 'shell',
  parameters: {
    properties: {
      command: { type: 'string' },
      timeout: { type: 'number' }
    }
  }
}

// Execution
async execute({ command, timeout = 30000 }) {
  const { stdout, stderr } = await execAsync(command, { timeout })
  return { stdout, stderr }
}

Summary

  • gemini-cli has ~10 built-in tools
  • Tools cover file operations, search, web access
  • Each tool follows the ServerTool interface

Next

Learn to create custom tools: Custom Tools →

Learn AI Agent development through real source code