Skip to content

Conversation

@jpantsjoha
Copy link

Summary

Adds comprehensive best practices guide for building function tools in ADK, covering:

  • File upload handling patterns: Support both uploaded files and file paths
  • Type annotation requirements: Proper typing for Gemini schema generation
  • Tool naming conventions: Clear, descriptive naming
  • Docstring standards: Comprehensive documentation
  • Error handling patterns: Clear, actionable error messages
  • Structured return values: Consistent result formatting

Context

This documentation was originally submitted to google/adk-python in PR #3193 but has been relocated to adk-docs as requested by @boyangsvl for public-facing documentation.

Location

docs/tools/best-practices.md

References

Testing

  • Documentation follows existing adk-docs formatting conventions
  • Code examples are tested and valid
  • Cross-references to existing documentation are correct

Add comprehensive best practices guide covering:
- File upload handling patterns (both uploaded files and file paths)
- Type annotation requirements
- Tool naming conventions
- Docstring standards
- Error handling patterns
- Structured return values

Addresses common pitfalls and provides examples for building
robust function tools in ADK.

Relocates content from google/adk-python#3193 as requested
by @boyangsvl.
Add new best practices guide to mkdocs.yml navigation under
'Custom Tools > Function tools' section.

Fixes mkdocs build warning about page not in nav configuration.
@jpantsjoha jpantsjoha force-pushed the docs/file-upload-best-practices branch from 4410e3f to 48a18a8 Compare October 18, 2025 12:21
@jpantsjoha
Copy link
Author

Hi team! 👋

Just a friendly check-in on this PR. It's been about 5 days since submission and I wanted to see if there's anything I can adjust or clarify to help with the review process.

Happy to make any changes needed. Thanks for your time reviewing community contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant