Repository navigation
feat: show return types in the catalog and point the names tier at stubs - #29
Merged
Merged
Conversation
- Build each stub's return type from `response_json_schema`: objects become `TypedDict` classes in the stub module, arrays `list[...]`, the rest `Any` - Let a tool with exactly one required parameter take it positionally - Escape backslashes and `"""` in generated docstrings so regex patterns no longer raise `SyntaxWarning` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CMpjWGGd4WWTt2Czk
- Define each module's `TypedDict` return types once at the top of its catalog section, ahead of the signatures - In the names tier, tell the model to run `help(fn)` or read the stub before calling a function it hasn't used - Document return types and the positional parameter in the README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CMpjWGGd4WWTt2Czk
- Hand code an MCP tool's `structuredContent` when it declares an `outputSchema`, after callbacks have seen ADK's result - Read MCP return types from the tool's `outputSchema`, so they no longer need ADK's JSON-schema feature flag - Give identical shapes one `TypedDict` across a module's tools - Name classes after their `$defs` key or `title`, else the property holding them; qualify by parent, then number, on a clash - Resolve `$ref` into `$defs`/`definitions`, including recursive refs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CMpjWGGd4WWTt2Czk
- Name it `<Tool>Response` rather than reusing another tool's identical shape, which named it after whichever tool sorted first Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CMpjWGGd4WWTt2Czk
- Only an untitled top-level object stays per tool; array items are entities like any nested object Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CMpjWGGd4WWTt2Czk
- Render each catalog section with `render_tools`, so it shares classes with the stubs and defines each shape once - Update the README example and catalog test for the new names Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CMpjWGGd4WWTt2Czk
Contributor
Author
|
- Take main's stubs, dispatcher and MCP result handling from #28 and #27 - Keep this branch's per-module catalog rendering Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CocX3w8EpGvN7Heip
…ier at stubs - Share one name registry across modules, so two sections never define different classes with the same name; a clash falls back to the tool's or parent's name - Render the catalog from one render_tools call, so it claims the same names as the stubs - Names tier: tell the model to read the stub, which has the return type's fields, instead of help(fn), and give the top-level /tools/<fn>.py path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CocX3w8EpGvN7Heip
Contributor
Author
|
Both addressed in df4b2ff:
I also merged Generated by Claude Code |
- Pointer tier and the no-metadata tool description now carry the same read-before-calling text as the names tier, after a line on listing /tools/ - Tell the model to print every stub it needs in one execute_code call - Keep all guidance in <how-to-use>; the pointer's <tools-package> only says the catalog is too large Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CocX3w8EpGvN7Heip
- Say tool calls that call APIs raise HTTP errors as HTTPStatusError, and other failures raise ToolError - Sync the README's copy of the tool description with the real text Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CocX3w8EpGvN7Heip
- Replace the save_artifact/load_artifact persistence sentence: files and tool results are saved automatically, so only load_artifact is needed - Drop the tool-result clause when save_tool_results_as_artifacts is off and the load_artifact clause when include_artifact_tools is off - Update the README and the constructor docstring to match Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013TYQ7CocX3w8EpGvN7Heip
- Preserve artifact envelopes, large-result pointers, and the wrapper threshold API. - Keep the full MCP result and describe its structured content in typed catalogs and stubs. - Cover the return formats and the large-result pointer type in the tests.
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
Tests