Skip to content

Support object type tool result #156

@logan272

Description

@logan272

Is your feature request related to a problem? Please describe.
Currently, the Tool Result can only return Text Content, Image Content, or Embedded Resources. However, there are many instances where I need the tool call to return a JSON object.

Describe the solution you'd like
I propose adding an object content type to the tool result, allowing for structured data to be returned directly. For example:

return {
   content: [
      {
           type: 'object',
           data: { ... }
      }
   ]
}

Describe alternatives you've considered
Currently, when I want to return structured data from a tool call, I have to use the following workaround, which is not ideal:

return {
   content: [
      {
           type: 'text',
           text: JSON.stringify(data)
      }
   ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions