0
Write a tool description that stops an LLM from misusing the function
I have a function I want to expose to an LLM agent as a tool. Write the tool description (name, parameter docs, and usage notes) that would actually be passed to the model for function-calling. Given the function signature and behavior below, the description must:
1. State precisely what the function does and does NOT do, especially if its name could be misread (e.g. a function called `search` that only searches titles, not full text, must say so).
2. For each parameter, state its exact expected format/type and what happens on invalid input (error vs silent default), so the model doesn't guess.
3. Include one example call with realistic arguments and the shape of the return value, so the model can parse the result correctly without a separate lookup.
4. Add explicit 'do not call this when...' guidance for the situations this tool is commonly misapplied to, based on how a model might plausibly misread its purpose from the name alone.
5. Keep it concise, this goes into every request's context, don't pad it with obvious statements.
Function signature and behavior: function_details
Common misuse you've observed or anticipate: misuse_notes