Define And Test
Task: Write and Test a Tool Definition
You are building an autonomous assistant for a Seoul high-school library. One of its jobs is to help students reserve study rooms. The assistant should be able to call a function to check availability and book a room.
Your task has two parts:
Part 1: Write the Tool Definition
Write a complete tool definition (in JSON format) for a function called reserve_study_room. The tool must specify:
name β exact function name
description β what the tool does and when to use it (2β3 sentences)
parameters β a JSON Schema object with these fields (all required):
room_numberβ identifier for the room (e.g., "A1", "B3")dateβ the date requested (format: YYYY-MM-DD)start_timeβ when the reservation begins (format: HH:MM in 24-hour time)duration_minutesβ how long to reserve (integer, 30β240 minutes)student_idβ the student's ID number (integer)
For each parameter, specify:
type(string or integer)description(what it accepts and any constraints)- Mark all as required
returns β a description of what the tool sends back (e.g., success status, confirmation number, error message)
Constraint: Your description and schema must be precise enough that an AI model reading it could call the tool correctly without human intervention. No vague phrasing like "some time" or "any ID".
Part 2: Spot the Weak Point
Consider this scenario: A student asks the assistant, "I want to study in room B3 at 2:30 PM for an hour and a half starting tomorrow."
The assistant processes this and calls your tool with:
{
"room_number": "B3",
"date": "tomorrow",
"start_time": "14:30",
"duration_minutes": 90,
"student_id": 20241234
}
Question: Identify the error(s) in the assistant's call given your tool definition. What would happen when your backend receives this call? How would you revise your tool definition's description to prevent this specific error?
What to Hand In
Submit a document with:
- Your complete JSON tool definition (formatted and valid JSON)
- Your answer to Part 2: the error(s), why they matter, and your revised description language
Test your definition by reading it aloud to a partner: would they be able to call the function correctly based only on your definition?