tokioai-coder-iot / tools /tool_definitions.json
MrMoz33's picture
TokioAI-Coder IoT Package v1.0 -- Engine + IoT System Prompt + Tools
4b97c3b verified
Raw History Blame Contribute Delete
6.94 kB
[
{
"type": "function",
"function": {
"name": "execute_local",
"description": "Execute a shell command on the local machine. Use for system operations: install packages, check processes, network scans, file operations.",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Shell command to execute (bash)"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds (default 30, max 120)"
}
},
"required": ["command"]
}
}
},
{
"type": "function",
"function": {
"name": "execute_raspi",
"description": "Execute a command on a Raspberry Pi via SSH.",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Command to run on Raspi"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds (default 30, max 120)"
}
},
"required": ["command"]
}
}
},
{
"type": "function",
"function": {
"name": "execute_gcp",
"description": "Execute a command on a GCP VM via SSH.",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Command to run on GCP"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds (default 30, max 120)"
}
},
"required": ["command"]
}
}
},
{
"type": "function",
"function": {
"name": "execute_router",
"description": "Execute a command on the router via SSH (root).",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "Command to run on router as root"
}
},
"required": ["command"]
}
}
},
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read a file from local or remote systems.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path. Use raspi:/path or gcp:/path for remote"
},
"lines": {
"type": "integer",
"description": "Max lines to read (default: all)"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "write_file",
"description": "Write content to a file.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path. Use raspi:/path or gcp:/path for remote"
},
"content": {
"type": "string",
"description": "File content to write"
}
},
"required": ["path", "content"]
}
}
},
{
"type": "function",
"function": {
"name": "edit_file",
"description": "Replace a specific string in a file. old_text must be unique.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path"
},
"old_text": {
"type": "string",
"description": "Exact text to find (must be unique)"
},
"new_text": {
"type": "string",
"description": "Replacement text"
}
},
"required": ["path", "old_text", "new_text"]
}
}
},
{
"type": "function",
"function": {
"name": "search_files",
"description": "Search for text patterns across files. Like grep -rn.",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "Text or regex pattern to search"
},
"path": {
"type": "string",
"description": "Directory to search"
},
"glob": {
"type": "string",
"description": "File filter glob (e.g., '*.py')"
}
},
"required": ["pattern"]
}
}
},
{
"type": "function",
"function": {
"name": "robot_vision",
"description": "Capture a photo from the robot's camera and analyze it with a vision AI model.",
"parameters": {
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "What to look for in the image (e.g. 'how many people?', 'describe the room')"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "diagnose",
"description": "Run system health diagnostics.",
"parameters": {
"type": "object",
"properties": {
"target": {
"type": "string",
"enum": ["local", "raspi", "gcp", "router", "all"],
"description": "Target system"
}
},
"required": ["target"]
}
}
},
{
"type": "function",
"function": {
"name": "memory",
"description": "Persistent memory across sessions. Actions: read, write, append, clear.",
"parameters": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["read", "write", "append", "clear"],
"description": "Memory operation"
},
"content": {
"type": "string",
"description": "Content to write/append"
}
},
"required": ["action"]
}
}
},
{
"type": "function",
"function": {
"name": "task",
"description": "Persistent task tracker across sessions.",
"parameters": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["add", "update", "list", "remove", "clear_done"],
"description": "Task operation"
},
"task": {
"type": "string",
"description": "Task description (for add)"
},
"id": {
"type": "integer",
"description": "Task ID (for update/remove)"
},
"status": {
"type": "string",
"enum": ["pending", "in_progress", "done", "blocked"],
"description": "New status"
},
"note": {
"type": "string",
"description": "Note to add"
}
},
"required": ["action"]
}
}
}
]