feat(agentforge): parse Google-style docstring Args for tool parameter descriptions#56
Draft
ChunkyTortoise wants to merge 2 commits into
Draft
feat(agentforge): parse Google-style docstring Args for tool parameter descriptions#56ChunkyTortoise wants to merge 2 commits into
ChunkyTortoise wants to merge 2 commits into
Conversation
Drift fixes: - README: replace broken services/llm_observability.py link with honest reference to A/B testing + per-bot cost tracker (file does not exist; end-to-end OTel tracing is planned, not shipped) - README: fix ghl_real_estate_ai/app.py link, point to api/main.py - README: drop llm_observability.py from project-structure tree - README + HIRING_REVIEW_GUIDE + CLAIM_LEDGER: update test count from 7,721 (Apr 29) to 7,665 (May 19) per fresh pytest --collect-only - docs/OBSERVABILITY.md: mark LLM Call Tracing and Agent Cost Tracker sections as Planned; both reference services that do not exist
Implement the TODO in BaseTool._generate_schema so that a tool's execute docstring populates each parameter's schema description. Adds a _parse_docstring_args helper that extracts the Google-style Args section, supporting multi-line descriptions and the optional name (type) form. Tools without a docstring, without an Args section, or with undocumented parameters produce an unchanged schema. Adds four unit tests covering these cases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agentforge/agentforge/tools/base.pyBaseTool._generate_schemaso each tool'sexecutedocstring populates the JSON-schema description for its parameters._parse_docstring_argshelper that handles the Google-style Args section, including multi-line descriptions and the optionalname (type)form.agentforge/tests/test_tools.py.Diff stat
2 files changed, 179 insertions, 2 deletions.
Notes
.maintenance/eh-worktree-decision.md.agentforge/uv.locklives next to the work; intentionally NOT included in this PR (separate decision).Test plan
tool.schemaDraft pending final read.