Skip to content

[Java] Align inline tool docs with final lambda API and ADR links#1885

Merged
edburns merged 4 commits into
edburns/1810-java-tool-ergonomics-tool-as-lambdafrom
copilot/1810-java-tool-ergonomics-tool-as-lambda
Jul 2, 2026
Merged

[Java] Align inline tool docs with final lambda API and ADR links#1885
edburns merged 4 commits into
edburns/1810-java-tool-ergonomics-tool-as-lambdafrom
copilot/1810-java-tool-ergonomics-tool-as-lambda

Conversation

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Phase 4.6 focused on documentation parity for Java tool-as-lambda ergonomics: README examples and ADR-006 needed to reflect the shipped API surface and cross-reference the ADR chain clearly. This updates Java docs to match final inline tool definitions (from* factories, Param<T>, and fluent modifiers) and completes the implementation-plan bookkeeping.

  • README: inline lambda tool authoring

    • Added a concise section for experimental inline tools with ToolDefinition.from(...).
    • Documented Param.of(...) required/default behavior and fluent option modifiers (skipPermission, defer, overridesBuiltInTool).
    • Included ToolInvocation-aware inline example and pointed to ADR-006 for design context.
  • ADR-006: final API name/usage alignment

    • Replaced outdated pseudo-DSL example (Params.of / ParamDef) with actual API (Param.of).
    • Clarified ADR-005 references using final annotation/API names (@CopilotToolParam, ToolDefinition.fromObject(...)).
    • Added explicit cross-link to ADR-005 and noted README coverage of the final factory family.
  • Plan bookkeeping

    • Marked Phase 4.6 as complete in the implementation plan file.
ToolDefinition search = ToolDefinition
    .from(
        "search_items",
        "Searches indexed items by keyword",
        Param.of(String.class, "keyword", "Search keyword"),
        keyword -> "Searching for: " + keyword)
    .skipPermission(true)
    .defer(ToolDefer.AUTO);

Copilot AI linked an issue Jul 2, 2026 that may be closed by this pull request
@edburns edburns changed the base branch from main to edburns/1810-java-tool-ergonomics-tool-as-lambda July 2, 2026 01:02
edburns
edburns previously requested changes Jul 2, 2026

@edburns edburns left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot CRITICAL: Your branch was created from the wrong base. You MUST rebase your branch onto edburns/1810-java-tool-ergonomics-tool-as-lambda immediately. The plan files and context referenced in issue #1884 only exist on edburns/1810-java-tool-ergonomics-tool-as-lambda. Run: git rebase origin/edburns/1810-java-tool-ergonomics-tool-as-lambda and force-push. Do this BEFORE any other work.

Copilot AI changed the title [WIP] Update Java docs and ADR cross-links [Java] Align inline tool docs with final lambda API and ADR links Jul 2, 2026
Copilot AI requested a review from edburns July 2, 2026 01:16
@edburns edburns dismissed their stale review July 2, 2026 01:24

Dismissing - base branch already fixed via PR edit.

@edburns

edburns commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

@copilot The PR base branch has been corrected to edburns/1810-java-tool-ergonomics-tool-as-lambda. Please continue working on this PR. Your task is described in issue #1884: update Java docs and ADR cross-links for the tool-as-lambda feature. The plan files you need are on the base branch. Please rebase your branch onto origin/edburns/1810-java-tool-ergonomics-tool-as-lambda and then complete the documentation updates described in the issue checklist.

Copilot AI and others added 2 commits July 2, 2026 01:34
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
- README: Added inline lambda tool authoring section with ToolDefinition.from(...) examples
- Documented Param.of(...) required/default behavior and fluent modifiers
- ADR-006: Updated to reflect final API (Param.of vs Params.of/ParamDef)
- ADR-006: Added ADR-005 cross-reference and README coverage note
- Plan: Marked Phase 4.6 as complete

Fixes #1884

Co-authored-by: edburns <75821+edburns@users.noreply.github.com>

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@copilot The PR base branch has been corrected to edburns/1810-java-tool-ergonomics-tool-as-lambda. Please continue working on this PR. Your task is described in issue #1884: update Java docs and AD...

Completed in commit cf82a90. Documentation updates include:

  • Java README now has a complete inline lambda tools section with ToolDefinition.from(...), Param.of(...), and fluent modifiers
  • ADR-006 updated to reflect final API names (Param.of instead of Params.of/ParamDef)
  • ADR-006 now cross-references ADR-005 and notes README coverage
  • Phase 4.6 marked complete in the implementation plan

Note: mvn spotless:apply couldn't run due to network issues, but Spotless only formats Java code (not Markdown), so the documentation-only changes don't require it.

@edburns edburns marked this pull request as ready for review July 2, 2026 01:38
@edburns edburns requested a review from a team as a code owner July 2, 2026 01:38
Copilot AI review requested due to automatic review settings July 2, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Java documentation to match the shipped “tool-as-lambda” API surface (inline ToolDefinition.from* factories, Param<T> metadata, and fluent modifiers), plus tightens ADR cross-references and marks Phase 4.6 documentation work as complete.

Changes:

  • Added a new experimental README section documenting inline lambda tool definitions and key factory variants (from*, from*WithToolInvocation).
  • Updated ADR-006 to use the final API names (Param.of, @CopilotToolParam, ToolDefinition.fromObject(...)) and explicitly list the implemented factory family.
  • Marked Phase 4.6 documentation updates as completed in the implementation plan.
Show a summary per file
File Description
java/README.md Adds inline lambda tool docs/examples and lists fluent modifiers.
java/docs/adr/adr-006-tool-definition-inline.md Aligns ADR examples and terminology with the final shipped API and links ADR-005.
1810-java-tool-ergonomics-tool-as-lambda-remove-before-merge/1810-ignorance-reduction-for-implementation-plan.md Updates Phase 4.6 checkbox to completed.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread java/README.md
Comment thread java/README.md Outdated
… ToolDefer.ALWAYS

- Added missing import statement to make the async handler code example
  self-contained and compilable.
- Removed ALWAYS from ToolDefer values list; enum only has NONE, AUTO, NEVER.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Low

@edburns edburns merged commit 05d9f67 into edburns/1810-java-tool-ergonomics-tool-as-lambda Jul 2, 2026
2 of 3 checks passed
@edburns edburns deleted the copilot/1810-java-tool-ergonomics-tool-as-lambda branch July 2, 2026 01:55
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.

[Java] Tool-as-lambda 4.6: Update Java docs and ADR cross-links

3 participants