mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-01 23:35:52 +00:00
1.5 KiB
1.5 KiB
Tool Usage Notes
Tool signatures are provided automatically via function calling. This file documents non-obvious constraints and usage patterns.
exec — Safety Limits
- Commands have a configurable timeout (default 60s)
- Dangerous commands are blocked (rm -rf, format, dd, shutdown, etc.)
- Output is truncated at 10,000 characters
restrictToWorkspaceconfig can limit file access to the workspace
glob — File Discovery
- Use
globto find files by pattern before falling back to shell commands - Simple patterns like
*.pymatch recursively by filename - Use
entry_type="dirs"when you need matching directories instead of files - Use
head_limitandoffsetto page through large result sets - Prefer this over
execwhen you only need file paths
grep — Content Search
- Use
grepto search file contents inside the workspace - Default behavior returns only matching file paths (
output_mode="files_with_matches") - Supports optional
globfiltering pluscontext_before/context_after - Supports
type="py",type="ts",type="md"and similar shorthand filters - Use
fixed_strings=truefor literal keywords containing regex characters - Use
output_mode="files_with_matches"to get only matching file paths - Use
output_mode="count"to size a search before reading full matches - Use
head_limitandoffsetto page across results - Prefer this over
execfor code and history searches - Binary or oversized files may be skipped to keep results readable
cron — Scheduled Reminders
- Please refer to cron skill for usage.