The first tool was easy. one input, one output. Reality is uglier: most useful functions take 2-5 parameters, some with limited values (enum), others with specific formats (dates, IDs).
Your job here is to define assign_shift: an operation that mutates the shift roster. Three parameters:
crewmate_alias. string. The crewmate's alias.shift_id. string. Specific format: shift-YYYY-MM-DD-NN.role. string. Only five valid values: lead, engineer, medic, comms, support.enumWhen a parameter accepts only a finite set of values, use enum:
"role": {
"type": "string",
"enum": ["lead", "engineer", "medic", "comms", "support"],
"description": "Role during the shift."
}With enum, the model can't invent values that don't exist ("captain", "doctor", "comms_lead"). The system rejects out-of-enum values and the model quickly learns the valid set.
Each parameter has its own description. For generic types (string, number), the description is what tells the model what to put in there. Example: shift_id is a string, but the model won't know the format unless you say so.
Rule of thumb: if you could pass the parameter wrong (weird format, invalid value), add its description.
lookup_crewmate is read-only. assign_shift mutates state. The tool description must make it clear which one is which. the model decides differently for operations that change things.