What does an ideal function-calling schema look like?
mediumAnswer
- (1) Descriptive
name: , notf1. - (2) Human-readable
descriptionexplaining when to use it. - (3) JSON Schema for
parameterswithrequiredfields,type,descriptionper field,enumfor constrained values,formatfor dates/emails. - (4) Examples in the description if the signature is subtle.
- (5) Return schema: describe what the tool returns so the LLM can interpret results.
- (6) Keep the tool set small (~5-15) — larger sets need retrieval-based tool selection.
Check yourself — multiple choice
- Random function names
- name + rich description + JSON Schema args (types, descriptions, enums, formats) + return schema + few examples
- Only names matter
- Same across all tools
Function schema: name + description + full JSON schema args + return type + examples.
#function-calling#agents#tools
Practise LLMs & GenAI
214 interview questions in this topic.
Related questions
- How does function calling / tool use work in modern LLMs?
- Describe a basic ReAct / agent loop.
- How should you write tool descriptions for reliable agent tool selection?
- How do you scale to hundreds of tools without overwhelming the LLM?
- How does a coding agent (SWE-agent, Aider, Cursor) actually work?
- How do parallel tool calls work?