# Less clear — overlapping descriptions
tools = [
{"type": "function", "function": {"name": "read", "description": "Read data from a source", "parameters": {"type": "object", "properties": {}}}},
{"type": "function", "function": {"name": "exec", "description": "Execute an operation on a source", "parameters": {"type": "object", "properties": {}}}},
]
# More clear — distinct names and explicit scope
tools = [
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read the contents of a file at a given path. Use this to inspect existing content before making changes. Do not use this to run code.",
"parameters": {"type": "object", "properties": {}},
},
},
{
"type": "function",
"function": {
"name": "execute_command",
"description": "Run a shell command and return its output. Use this to run scripts, tests, or system operations. Do not use this to read file contents.",
"parameters": {"type": "object", "properties": {}},
},
},
]