Skip to content

Fix missing output_schema argument in 'define_tool' API#301

Open
amorde wants to merge 1 commit intomodelcontextprotocol:mainfrom
amorde:define-tool-output-schema
Open

Fix missing output_schema argument in 'define_tool' API#301
amorde wants to merge 1 commit intomodelcontextprotocol:mainfrom
amorde:define-tool-output-schema

Conversation

@amorde
Copy link
Copy Markdown

@amorde amorde commented Apr 6, 2026

Add missing output_schema keyword argument to MCP::Server#define_tool

Motivation and Context

Using the define_tool API it's not currently possible to pass in the output_schema value.

How Has This Been Tested?

Unit tested

Breaking Changes

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

N/A

Tool::Response.new({ "response" => message })
end

stored_tool = @server.instance_variable_get(:@tools)["defined_tool"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
stored_tool = @server.instance_variable_get(:@tools)["defined_tool"]
stored_tool = @server.tools["defined_tool"]

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.

2 participants