Repository navigation
Release 0.20.0: tool-card labels from arguments, catalog-aware argument lists - #52
Merged
Merged
Conversation
A tool schema's x-summary-template, or the catalog's summary_template, labels the card head and the step-group row with its placeholders filled from the call's top-level scalar arguments. Any placeholder that cannot be filled falls back to the static label chain unchanged. The fixture is django-spec-agents 0.31.0's own build_tool_catalog output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parseToolCatalog keeps an entry's arguments (title, format, enum labels, x-hidden), tolerant per property; ToolCatalog.argumentDisplays serves a client tool's own parameters first, then the catalog; renderReadablePayload takes them as an optional display. Fixture recorded from django-spec-agents 0.31.0's build_tool_catalog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The card's arguments region reads its tool's argument displays (a client tool's own schema, else the catalog's arguments): titles, enum labels, Intl dates, hidden keys left out; View raw keeps the JSON. Docs, CHANGELOG and the search-orders demo scenario. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… open Name the demo prompt without a version, document ToolCallCardOptions.display, export the argument display types, run the happy-dom suite in a zone behind UTC so a date drawn in local time fails, and add tests for a filled template over toolSummaries, a non-date format, non-string titles and templates, an object oneOf, and markup in catalog and choice titles. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Release 0.20.0: tool-card labels from arguments, and catalog-aware argument lists
Two cards; the connectors element (CONNECTORS-WC) and the approval form (READ-ARGS-WC-APPROVAL) move to 0.21.0 to keep this release near the 50-file budget (33 files here).
READ-ARGS-WC-TEMPLATE
A tool schema's
x-summary-template(X_SUMMARY_TEMPLATE_KEY), or thedata-tools-urlcatalog'ssummary_templatefrom django-spec-agents 0.31.0, fills the card head and the step-group row from the call's top-level string, number and boolean arguments ("Search orders for {query}"). If any placeholder cannot fill, the static label stays. A filled template outranks every static label,toolSummariesincluded. Values are set as text.ToolCatalogEntrygainssummaryTemplate. No opt-in.READ-ARGS-WC-CATALOG
The catalog's
argumentsprojection (per propertytitle,format, enum labels asoneOf: [{const, title}],x-hidden) is parsed tolerantly: a malformed projection costs that field, never the entry or its label. A client tool reads the same keys off its ownparametersschema, ahead of the catalog. The readable arguments list draws the title as the label,date/date-timethroughIntlin the browser's locale (a date as its UTC calendar day), enum constants as their labels, and leavesx-hiddenproperties out; View raw keeps the exact JSON. A catalog withoutargumentsrenders exactly as in 0.19.0.ToolCallCardOptionsgainsdisplay;ArgumentDisplays,ArgumentDisplay,ArgumentChoiceandPayloadDisplayare exported types. No opt-in.Verification
build_tool_catalog(scripts/record_summary_template_fixture.py,scripts/record_tool_arguments_fixture.py) and regenerate byte-identical.mainfail on their assertions.ToolCallCardOptionsdocs, atoolSummariesranking test, a date test blind in UTC (the happy-dom run is now pinned to a negative-offset zone invitest.config.ts), and aoneOf: {}guard. Round 2 verdict: ready, 36 of 40 mutants killed, the rest equivalent.make test(364 files, 5323 tests, 100% coverage, Chromium included), build, docs strict.Demo: Tool cards, prompt "Labels from arguments" (filled head, catalog titles, enum label, formatted date, hidden
trace_id).Left for the owner: a call whose arguments are all
x-hiddenopens onto an empty Arguments list with only View raw. This is pinned by a test on purpose; say whether the region should collapse.🤖 Generated with Claude Code