Expand description
Shared constants for tool operations to eliminate duplication
This module provides common constants used across multiple tool implementations to reduce code duplication and ensure consistency.
Constants§
- COMMAND_
ERROR_ PATTERNS - Command execution error patterns
- DEFAULT_
HASHMAP_ CAPACITY - DEFAULT_
STRING_ CAPACITY - DEFAULT_
VEC_ CAPACITY - Default capacity hints for common collections
- ERROR_
DETECTION_ PATTERNS - Standard error patterns used for error detection across tools These patterns are used in grep operations and error analysis
- FILESYSTEM_
ERROR_ PATTERNS - File system error patterns
- GIT_
ERROR_ PATTERNS - Git-specific error patterns
- MAX_
CONTEXT_ LINES - MAX_
FILE_ SIZE_ FOR_ PROCESSING - Common tool operation limits
- MAX_
LIST_ ITEMS_ SUMMARY - MAX_
OUTPUT_ TOKENS - MAX_
SEARCH_ RESULTS - Context optimization constants following AGENTS.md guidelines
- NETWORK_
ERROR_ PATTERNS - Network-related error patterns for more specific error detection
- OVERFLOW_
INDICATOR_ PREFIX - OVERFLOW_
INDICATOR_ SUFFIX - RESOURCE_
ERROR_ PATTERNS - Memory and resource error patterns
Functions§
- empty_
object_ schema - Reusable empty JSON object schema
{"type": "object"}for tool parameter definitions. Used by tools that accept no parameters or only optional parameters.