Skip to content

feat(server): add utility functions for CallToolResult #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Stream29
Copy link

Motivation and Context

I add two function in types.util.kt : CallToolResult.Companion.ok and CallToolResult.Companion.error.

I found it being a boilerplate code when writing CallToolResult(listOf(TextContent(content))). So I think it's necessary to add a short hand for constructing CallToolResult.

My solution is : CallToolResult.ok(...) and CallToolResult.error(...).

I added these two functions with document.

How Has This Been Tested?

It's just a wrapper of the constructor of CallToolResult, so I think no test needed after viewing the code.

Breaking Changes

This is not a breaking change.

Types of changes

  • [+ ] New feature (non-breaking change which adds functionality)

CallToolResult.Companion.ok and CallToolResult.Companion.error
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.

1 participant