SavvyTelegram / tool_registry.py
StarpowerTechnology's picture
Upload 13 files
a6e3889 verified
"""Tool schemas passed to the model. These must match executor.py exactly."""
TOOL_DEFINITIONS = [
{
"type": "function",
"function": {
"name": "web_search",
"description": "Search the internet. Use for any question about current events, facts, or research.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query"
},
"max_results": {
"type": "integer",
"description": "Number of results to return (default 5, max 10)",
"default": 5
}
},
"required": ["query"]
}
}
},
{
"type": "function",
"function": {
"name": "github_read",
"description": "Read a file from the GitHub repo. Use full path e.g. memory/123.md",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path inside the repo"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "github_write",
"description": "Create or update a file in the GitHub repo.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path inside the repo (e.g. Savvy/notes.md)"
},
"content": {
"type": "string",
"description": "Full text content to write"
},
"commit_message": {
"type": "string",
"description": "Git commit message (optional)",
"default": ""
}
},
"required": ["path", "content"]
}
}
},
{
"type": "function",
"function": {
"name": "github_list",
"description": "List all files inside a GitHub folder.",
"parameters": {
"type": "object",
"properties": {
"folder": {
"type": "string",
"description": "Folder name: memory, projects, Savvy, or research"
}
},
"required": ["folder"]
}
}
},
{
"type": "function",
"function": {
"name": "quick_reply",
"description": "Send a SHORT message to the user immediately — use this when you need to acknowledge, share a partial finding, or let them know you're still working. Continue using tools after calling this.",
"parameters": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Short message to send now (keep it brief)"
}
},
"required": ["message"]
}
}
}
]