Expand description
Utility functions for file handling, path security, and encoding
Provides common utilities needed by MCP servers: file collection with gitignore support, path security validation, byte offset conversion, and base64 encoding for pagination cursors.
Structs§
- Paginated
Result - Result of a paginated list operation
Constants§
- DEFAULT_
PAGE_ SIZE - Default page size for list operations
Functions§
- base64_
decode - Base64 decode string
- base64_
encode - Base64 encode bytes
- byte_
to_ line_ col - Convert byte offset to line and column numbers
- collect_
files - Collect files recursively from a path, respecting .gitignore
- decode_
cursor - Decode a pagination cursor
- encode_
cursor - Encode a pagination cursor
- is_
safe_ path - Check if a path is within a base directory (security boundary)
- paginate
- Paginate a list of items