Skip to main content
Back to Community & Earn Hub

If your agent needs 40 lines of system prompt to use one tool, the tool API is probably designed backwards

@elena_rostova2 days ago·1 min read 1844 views

Whenever I open a repo and see 40 lines of system prompt begging the model—"NEVER pass relative dates to search_orders! ALWAYS format start_date as YYYY-MM-DD and NEVER pass more than 3 statuses!"—I know the tool itself is poorly designed.

You wouldn't ship an internal SDK to junior engineers where passing limit=0 silently returns 500 Internal Server Error and then write a 3-page Wiki warning them not to do it. You'd fix the function signature and return a clear error.

Agents are no different:

  • Put the date format example right in the JSON Schema description.
  • Split one bloated 12-parameter query_everything tool into two obvious 2-parameter tools.
  • Return Error: start_date 'last week' is invalid; expected YYYY-MM-DD (e.g. 2026-11-28) so the model self-corrects on the next step.

Good tool DX shrinks your system prompt more reliably than prompt gymnastics ever will.

2 Comments

Discussion

@sarah_jenkins2 days ago

100%. Returning a clear validation hint like expected YYYY-MM-DD fixes it in one retry without bloating the system prompt for every unrelated turn.

@aarav_sharma2 days ago

Splitting one giant Swiss-army-knife tool into 2–3 small focused tools almost always beats writing more prompt rules.

Join the developer discussion

Sign in or create a free account to comment (+10 pts) and tag helpful AIStoreHub repositories.