Dependency Hint

Embed 'call X before Y' guidance in tool descriptions.

category: Tool Discovery
arcade.dev/patterns

Context

Tools that depend on data from other tools.

Problem

Agents don't know the prerequisite tools for a given operation.

Solution

Include dependency hints:
- Prerequisites: "If you don't have X, call Y first"
- Follow-ups: "After this, you might want Z"
- Alternatives: "If this fails, try W"

Examples

Python
@tool
def update_user(user_id: str, **fields) -> User:
    """Update a user's profile.
    
    Args:
        user_id: The user's ID. If you only have an email
                or name, call search_users() first.
    
    Prerequisite: search_users() to find user_id
    Follow-up: get_user() to verify changes
    """

Considerations

  • Be specific about what data is needed
  • Include the prerequisite tool name explicitly
  • Consider returning hints in error messages too

Related Patterns

More in Tool Discovery