Skip to content

Conversation

mingshl
Copy link
Contributor

@mingshl mingshl commented Oct 1, 2025

Description

Add doc for scratchpad tools

Issues Resolved

Closes #11146

Version

_List the OpenSearch version to which this PR applies, e.g. 3.3

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Mingshi Liu <[email protected]>
Copy link

github-actions bot commented Oct 1, 2025

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@kolchfa-aws kolchfa-aws added In progress Issue/PR: The issue or PR is in progress. release-notes PR: Include this PR in the automated release notes v3.3.0 labels Oct 2, 2025
@kolchfa-aws
Copy link
Collaborator

@mingshl Thank you for the PR! When you connect it to an issue, you have to leave "Closes", "Fixes", or "Resolves" so it's properly linked (in this case, Closes #11146). I updated the PR description.

@mingshl mingshl marked this pull request as ready for review October 3, 2025 21:48
@kolchfa-aws kolchfa-aws added Tech review PR: Tech review in progress and removed In progress Issue/PR: The issue or PR is in progress. labels Oct 6, 2025
Signed-off-by: Mingshi Liu <[email protected]>

Parameter | Type | Required/Optional | Description
:--- | :--- | :--- | :---
`notes` | String | Required (at execution) | The content to write to the scratchpad
Copy link
Contributor

Choose a reason for hiding this comment

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

why notes parameter here is marked as required, but on line 107, notes is optional?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the notes field is optional in registering the tool but it's required when executing

Copy link
Contributor

Choose a reason for hiding this comment

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

can you clarify that in the doc? it's kinda confusing and the execution/registration flow is not explained

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 Or we can combine into one table and mentioned optional during registration, required during execution

Copy link
Contributor Author

@mingshl mingshl Oct 10, 2025

Choose a reason for hiding this comment

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

@pyek-bot remembered that the tool has strict schema, so the notes field is required when executing, it can be empty string but it's a required field by schema. I have to make two tables to explain when register in agents, the notes field is optional, but in executing the tools by api, it's required.

check out this new commit and see this is easier to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nathaliellenaa I am sure if this is a bug in execute API.

when I check the trace of agent execution, the tool can have no parameters, but if you use the same tool with tool execute api, you cannot pass empty parameters, I think there is strong validations there. If there is, I think we should take this validation off, there are use cases of tool execution will no parameter.

Screenshot 2025-10-10 at 4 59 53 PM Screenshot 2025-10-10 at 4 58 47 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks Mingshi for catching this, will take a look

@mingshl mingshl added Doc review PR: Doc review in progress and removed Tech review PR: Tech review in progress labels Oct 11, 2025
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@kolchfa-aws Editorial review complete. I've left my changes so that you can see them while reviewing. Otherwise, LGTM. Thanks!

Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@kolchfa-aws Editorial review complete. I've left my changes so that you can see them while reviewing. Otherwise, LGTM. Thanks!

@natebower
Copy link
Collaborator

@kolchfa-aws Editorial changes committed.

Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
kolchfa-aws and others added 2 commits October 13, 2025 15:27
@natebower natebower removed the Doc review PR: Doc review in progress label Oct 13, 2025
@natebower natebower merged commit eecc342 into opensearch-project:main Oct 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes PR: Include this PR in the automated release notes v3.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC] Introduce ReadFromScratchPads and WriteToScratchPadsTools

5 participants