Improve prompt

This commit is contained in:
Nicolas Mowen 2026-05-22 12:25:24 -06:00
parent 115e7525c6
commit d47ac788c0
2 changed files with 16 additions and 4 deletions

View File

@ -733,7 +733,14 @@ async def _execute_tool_internal(
"Arguments: %s", "Arguments: %s",
json.dumps(arguments), json.dumps(arguments),
) )
return {"error": "Camera parameter is required"} return {
"error": (
"get_live_context requires a single camera name; "
"wildcards and empty values are not supported. "
"Call this tool once per camera."
),
"available_cameras": allowed_cameras,
}
return await _execute_get_live_context(request, camera, allowed_cameras) return await _execute_get_live_context(request, camera, allowed_cameras)
elif tool_name == "start_camera_watch": elif tool_name == "start_camera_watch":
return await _execute_start_camera_watch(request, arguments) return await _execute_start_camera_watch(request, arguments)

View File

@ -518,16 +518,21 @@ def get_tool_definitions(
"function": { "function": {
"name": "get_live_context", "name": "get_live_context",
"description": ( "description": (
"Get the current live image and detection information for a camera: objects being tracked, " "Get the current live image and detection information for a single camera: objects being tracked, "
"zones, timestamps. Use this to understand what is visible in the live view. " "zones, timestamps. Use this to understand what is visible in the live view. "
"Call this when answering questions about what is happening right now on a specific camera." "Call this when answering questions about what is happening right now on a specific camera. "
"Operates on one camera at a time; call the tool again for each additional camera. "
"Wildcards and empty values are not accepted."
), ),
"parameters": { "parameters": {
"type": "object", "type": "object",
"properties": { "properties": {
"camera": { "camera": {
"type": "string", "type": "string",
"description": "Camera name to get live context for.", "description": (
"Exact name of a single camera to get live context for. "
"Wildcards (e.g. '*', 'all') and empty strings are not accepted."
),
}, },
}, },
"required": ["camera"], "required": ["camera"],